By Patricia Sellers

At 35, Marissa Mayer is the youngest person ever to make Fortune‘s Most Powerful Women list. Clearly, she isn’t slowing down.

Last week, over dinner in Silicon Valley, Mayer told me about her new job at Google . The company’s first female engineer and until recently its VP of Search Products and User Experience, Mayer is now overseeing Google’s local and location services–key to its growth strategy. In addition to that, she just joined the company’s operating committee, where the big decisions get made.

One week into her new gig, she was prepping to host her first-ever political fund-raiser. Her dinner guest? The President of the United States.

So it seemed kind of crazy that just before her VIP soiree, Mayer carved out time to jet from California to New York City to hobnob at Fortune‘s 40 Under 40 party. She’s on that list, at No. 34, as well as coming in at No. 42 in Fortune‘s Most Powerful Women rankings.

Mayer pulled off her event, which drew some 60 rich Obama supporters at a price of $30,000 a head. Among her guests last Thursday: onetime Cisco (CSCO) CTO Judy Estrin, venture capitalist Brook Byers of Kleiner Perkins Caufield & Byers, and Salesforce.com CEO Marc Benioff and his wife, Lynne. (Conspicuously absent: Google CEO Eric Schmidt and founders Sergey Brin and Larry Page, who were in New York at the launch of YouTube Play–an online video competition by the Google subsidiary.)

Her dinner lineup was more tech-heavy than Mayer first envisioned. She had thought she’d have the dinner at her apartment in San Francisco–until a potential traffic nightmare, thanks to the Giants making the National League playoffs, nixed that notion. Turns out, Mayer’s Silicon Valley home was the perfect setting. She lives about 10 houses away from 367 Addison Avenue, the site of the 8×10-foot building where Bill Hewlett and Dave Packard founded Hewlett-Packard .

“I worked that into my intro,” Mayer told me in a post-party email. “And the President worked that into his talking points.”

The hot topics at the dinner? “Innovation and jobs, along with the upcoming election,” Mayer says. As the President made his rounds, taking an open seat at six different tables for about 15 minutes each, he fielded questions about how to create more Googles and HPs–and H-1B visas, which Silicon Valley execs strongly support to bring more tech talent to their companies.

At the end of the evening, Mayer recalls, President Obama walked across the street to shake hands and sign pictures for a group of schoolchildren who were hoping to meet him. The kids were “over the moon,” she says, admitting that she didn’t make it easy for him to escape. For Halloween, Mayer and her husband, Zach decorated their front yard with animatronics–mummies that remove their own heads, a Jason robot who swings and chops, cornstalks, scarecrows. How did the President navigate? “With grace,” she says.