In his remarks, he compared recent progress on gay rights to the civil rights movement. 

"In successive waves, the history, the scope of this country has always been to further broaden the meaning of citizenship to include more and more people; to give better and better expression to our highest aspirations; to make the country more fair and more just and more equal," he said. "That’s what wars were fought about. That’s what the civil rights movement was about. That’s what the women’s movement was all about. That’s what the workers’ movement was all about -- this constant progression to include more and more people in the possibility of the American Dream. And so this is just one more step in that journey that we’ve taken as a nation."

Obama, who attended fundraisers in San Francisco earlier in the day, followed up with two star-studded events in Los Angeles, one held at the Beverly Wilshire hotel, setting for the film “Pretty Woman,” and a smaller event at the home of "Glee" creator Ryan Murphy. 

Both Beverly Hills fundraisers leaned heavily on the president's newly strengthened support of lesbian, gay, bisexual and transgender (LGBT) rights. Obama's public support for gay marriage, announced last month, has particularly bolstered his support in California, and Wednesday's events were expected to raise millions for the president's reelection campaign.

Attendees, according to press pool reports, included "Pretty Woman" star Julia Roberts, Reese Witherspoon, Jane Lynch, Jesse Tyler Ferguson, Cher and Ellen DeGeneres. "Glee" star Darren Criss performed for the hotel crowd. Fox's high school musical "Glee" is known for featuring gay characters and themes.

The Beverly Wilshire event, touted as an LGBT gala, charged ticket prices ranging from $1,250 to $25,000 apiece. The large venue was selected after ticket demand spiked following Obama's May endorsement of gay marriage.

“I could not be prouder of the work that we’ve done on behalf of the LGBT community,” Obama told them. "From the work we did to facilitate hospital visitations to ending the HIV/AIDS ban, to the work we did to pass the Matthew Shepard law, to repealing 'Don’t Ask, Don’t Tell,' to all the administrative work that’s been done by agencies to make sure that folks are fully recognized is something that I’m personally very proud of."

Earlier in the day, at an event featuring baseball great Willie Mays in San Francisco, Obama continued in his new habit of comparing GOP nominee Mitt Romney to Sen. John McCainJohn Sidney McCainMcCain rips Trump for attacks on press NSA spying program overcomes key Senate hurdle Meghan McCain says her father regrets opposition to MLK Day MORE (R-Ariz.), who ran against Obama on the Republican ticket in 2008 and whom Obama characterizes as more moderate than Romney.

"When I ran in 2008, I was running against a guy who I had a lot of disagreements with, but he believed in climate change, he believed in campaign finance reform, he believed in immigration reform," he told the crowd in San Francisco's Julia Morgan Ballroom. "The character of the party and the Republicans in Congress had fundamentally shifted."

Obama will remain on the West Coast until Thursday afternoon, attending more fundraisers and then speaking at the University of Nevada Las Vegas.

This post was updated at 9:11 a.m.