"We're doing the grinding, sometimes frustrating work of actually delivering change. I know it can be discouraging," Obama told a crowd of 10,000 at an energetic rally at Boston's Hynes Convention Center.
Obama came to Boston to campaign for his friend and political ally, Massachusetts Gov. Deval Patrick, who is struggling to overcome the anti-incumbent mood that has swept across the country during this election season. Obama said Patrick's opponent is banking on the same strategy as national Republicans.
"They figured they could ride people's anger and frustration all the way to the ballot box," said Obama, dressed more casually for the weekend rally, in a sport coat but no tie.
With just over two weeks until election day, Obama has been campaigning coast to coast, raising money for candidates and looking to energize dispirited Democratic voters. While the White House says it still believes Democrats will retain control of the House and Senate, a the slow pace of the economic recovery leaves the political climate perilous for the president's party.
Recent polls suggest Republicans may well retake the House and make major gains in the Senate.
"There is no doubt that this a difficult election. That's because we've been through an incredibly difficult time as a nation," Obama told the crowd of mostly Democrats.
As he has throughout this campaign season, Obama sought to frame the election as a choice between his policies, which he says are moving the country forward, and those of the GOP, who he says want to return to the policies of the past.
"The worst thing we could do is go back to a philosophy that nearly destroyed our economy," Obama said.
Obama and Patrick share Chicago roots and a Harvard pedigree. Republicans have sought to use Patrick's close relationship with the president as a wedge issue in the gubernatorial race.
Although Massachusetts is among the nation's most liberal states, the last four governors before Patrick were Republicans.
Massachusetts voters have opted for GOP governors as a hedge against perceived excesses by the Democratic-run state Legislature. A poll from Suffolk University and WHDH-TV shows Patrick with a 7-point lead over Republican challenger Charles Baker. Patrick is also being challenged by independent Timothy Cahill, whose candidacy threatens to split the anti-Patrick vote.
Obama's remarks were interrupted twice by protesters demanding more funding for HIV/AIDS. Supporters in the crowd tried to drowned out the protesters by chanting, "Yes We Can," Obama's slogan during the 2008 presidential campaign.
Obama responded directly to the protesters, saying his administration had increased AIDS funding and told them to, "take a look at what the Republican leadership has to say about AIDS funding."
Obama called on Democrats to show up on election day.
"I need all of you to be clear," he told the crowd, "over the next two weeks this election is a choice and the stakes could not be higher."
Obama also spoke at a fundraiser near Boston Saturday that raised $900,000 for the Democratic Senatorial Campaign Committee.
AP Political Writer Glen Johnson contributed to this report.