Obama journeyed to San Francisco to raise campaign cash for Democrat Barbara Boxer, who is battling to win a fourth term in November congressional elections.
"I don't travel for just anybody," Obama said at the first of three fundraising events on his second trip to California for Boxer, a sign of the importance he puts on getting her re-elected in what is normally a safe state for Democratic candidates.
The events were expected to raise $600,000 specifically for Boxer and $1.1 million for Democratic Senate candidates.
"Move faster on 'Don't ask, don't tell,'" a man in the audience shouted, interrupting the president. The White House on Monday backed a proposal that would move toward repeal of the ban.
Obama spent a big part of his remarks criticizing Republicans for leading the country into an economic mess before his election and working against him now in Congress.
"I understand the strategy of sitting on the sidelines," Obama said. "Politically it hasn't been bad for them. It made a lot of people forget how we got into this mess in the first place -- just sitting there and saying 'no' to everything."
The president met with Senate Republicans earlier on Tuesday, encouraging them to help him tackle immigration and energy reform.
Obama hopes his efforts to paint Republicans as unhelpful in tackling the country's economic woes will resonate in the November polls despite a tricky environment for Democrats with a U.S. jobless rate of 9.9 percent.
An average of recent polls by realclearpolitics.com showed Boxer in a tight race with two potential Republican opponents, former Hewlett-Packard chief Carly Fiorina and former congressman Tom Campbell.
California Republicans will choose between them and conservative Tea Party candidate Chuck Devore in a June 8 primary election that will determine who challenges Boxer.
Obama drew fire from Republicans for leaving Washington during the Gulf of Mexico oil spill crisis. The president is traveling to the Louisiana Gulf on Friday.
National Republican Senatorial Committee spokeswoman Amber Marchand said: "While the president makes time to fly across the country to rake in campaign cash for struggling Democrats like Barbara Boxer, today's trip comes at a special cost for residents of the Gulf Coast region who want the president's full attention on this enormous problem."
Obama stressed his concern about the spill in his remarks.
"Nobody is more upset than me because ultimately, like any president, when this happens on your watch, then every day you are thinking, 'How does this get solved?'" he said.
The president joked about his declining popularity since taking office -- a fact that Republicans seek to exploit.
"Some folks say, 'Well, you know he's not as cool as he was," Obama said, noting his image now had a "Hitler mustache" on some political posters. "That's quite a change," he said.
(Additional reporting by Steve Holland; Editing by Bill Trott)