There may be no better place to measure the shifting fortunes of President Obama and the Democratic Party than in the race being fought here this weekend for the Senate seat that had been held by Edward M. Kennedy.
When Mr. Obama was inaugurated one year ago this week, he and his party had big majorities in the Senate and House, enjoyed the backing of much of the country and were confidently preparing to enact an ambitious legislative agenda. Republicans seemed directionless and the conservative movement exhausted.
This weekend, Democrats are struggling to hang on to a seat held by Mr. Kennedy for 46 years in one of the most enthusiastically Democratic states in the country. Conservatives are enjoying a grass-roots resurgence, and Republicans are talking about taking back the House in November.
As Mr. Obama prepares to come here on Sunday to campaign for the party’s beleaguered Senate candidate, Martha Coakley, Democrats across the country are starting to wonder aloud if they misjudged the electorate over the last year, with profound ramifications for the midterm elections this year and, potentially, for Mr. Obama’s presidency.
Win or lose in Massachusetts, that a contest between a conservative Republican and a liberal Democrat could appear so close is evidence of what even Democrats say is animosity directed at the administration and Congress. It has been fanned by Republicans who have portrayed Democrats as overreaching and out of touch with ordinary Americans.
“It comes from the fact that Obama as president has had to deal with all these major crises he inherited: the banks, fiscal stimulus,” said Senator Paul G. Kirk Jr., the Democrat who holds the Massachusetts seat on an interim basis pending the special election. “But for many people it was like, ‘Jeez, how much government are we getting here?’ That might have given them pause.”
Senator Evan Bayh, Democrat of Indiana, said the atmosphere was a serious threat to Democrats. “I do think there’s a chance that Congressional elites mistook their mandate,” Mr. Bayh said. “I don’t think the American people last year voted for higher taxes, higher deficits and a more intrusive government. But there’s a perception that that is what they are getting.”
Ms. Coakley, the state attorney general, could still defeat her Republican opponent, State Senator Scott Brown. Polls show the race as very close, and measuring public opinion in special elections is always difficult.
Support for the health care overhaul could grow if it is enacted into law and Americans decide that it has left them better off, as Mr. Obama says will happen. The economy could take a turn for the better by this summer, validating Mr. Obama’s policies in time to influence the midterm elections. And for all the national forces at play here, Ms. Coakley has, in the view of most Democrats, made things worse with a slow-starting and low-energy campaign marked by several high-profile errors.
Still, Mr. Obama’s decision to tear up his weekend schedule to come here reflects concern in the White House that a defeat of Ms. Coakley would be seen as a repudiation of the president’s first year. It would also raise the question of whether Mr. Obama squandered political capital by focusing so much on health care at a time of rising unemployment.
“If it works well, it was a good thing to do for the country here,” Mr. Bayh said. “But there’s definitely an opportunity cost. You could only spend political capital once; it now can’t be spent on other things.”
The Massachusetts campaign has neatly encapsulated the major themes that have come to deplete Mr. Obama’s popularity, themes that have fueled the rise of the Tea Party movement on the right and created an atmosphere where growing numbers of Democrats in conservative-leaning districts and states have decided not to run again.
Mr. Brown is running directly against the health care plan, and Ms. Coakley is standing by it. Should Mr. Brown win, it would undercut assurances Mr. Obama has been offering nervous Democrats that health care will ultimately lift them at the polls.
“This is Ted Kennedy’s state — why can any Republican be competitive here?” asked Dick Armey, a former congressman who leads a conservative grass-roots organization that has been active on behalf of Mr. Brown. “The reason is health care.”
Of course, Republicans holding statewide office are not unheard of. Though Massachusetts last had a Republican senator in 1979, Republicans held the governor’s office from 1991 to 2007. Former Gov. Mitt Romney, a moderate on issues like abortion and gay rights, went on to an unsuccessful bid for the presidency by moving to the right on some issues.
Mr. Brown has portrayed Ms. Coakley as an advocate of big government, big spending and big deficits; Obama advisers and other Democrats have worried that the expanding deficit, now at a level not seen since World War II, was hurting Mr. Obama with independents who lifted him to victory in 2008. Polls suggest that those voters have flocked to Mr. Brown, as they did to Republican candidates for governor in Virginia and New Jersey last year.
“I don’t know what else it would take to wake up the Democratic leadership about the unpopularity of their agenda across the country than losing a Senate race in Massachusetts,” said Senator John Cornyn of Texas, the chairman of the Senate Republican campaign committee.
Mr. Brown has also portrayed Ms. Coakley — and by inference, her party — as acting as if she were entitled to the Kennedy seat, a perception Ms. Coakley reinforced by at first running an extremely lackadaisical campaign. With populist anger running strong, anything that smacks of establishment entitlement is politically dangerous.
The risks to the White House are both immediate and long-term. A victory by Mr. Brown would mean losing the 60th vote Democrats need to stave off a filibuster in the Senate.
“If he’s running against 60 votes and wins, that is not good,” said Bob Kerrey, a former Democratic senator from Nebraska.
But most ominously for Democrats contemplating the midterm elections, the battle here suggests an emerging dangerous dynamic: that Mr. Obama has energized Republican activists who think he has overstepped with health care and the economic stimulus, while demoralizing Democrats who think he has not lived up to his promise.
“When Brown avails himself to the Tea Partiers and the Club for Growth members and all of that wing of the party, yes, they have a lot of intensity on their side,” said Senator Robert Menendez of New Jersey, who leads the Democratic Senatorial Campaign Committee. But, Mr. Menendez said, Democrats would match that enthusiasm now that the party has made a greater effort to draw distinctions between the two candidates.
Mr. Obama may have had no less treacherous road to take, given the tangle of political problems and divisions within the Democratic Party that confronted him last year.
Still, some Democrats are wondering if Mr. Obama would be in a better position now if he had embraced a less ambitious health care proposal, as some aides urged, permitting him to pivot more quickly on the economy. Depending on what happens Tuesday, that is a debate that might be reverberating in the White House for a long time to come.