As the votes were being counted Tuesday night, one voice on the cable talkfest tolled the bell for Democrats: “The White House is in a crouch. They’re looking for a tsunami to come.”

That is the view from inside Washington of the revolution taking place outside, and against, Washington. There is an element of truth in it—and the theme has become part of the pitch even for progressive challengers. So on both sides, expect echoes of this political season’s sounds of discontent. But Tuesday was a promising night for Barack Obama and his party, shifting the odds in critical contests and pointing toward Democratic survival and revival.

In Pennsylvania and Arkansas, Obama won by losing.

He had endorsed Sen. Arlen Specter; he had to. The health reform bill wouldn’t have passed without him. But as the primary campaign evolved, the reality became increasingly clear: Joe Sestak was far better positioned than Specter to defeat the hard-right Republican, former Congressman Pat Toomey. The battered, overtly opportunistic Specter who lost the primary was on course to lose the general. Now Democrats will probably hold the seat he gave them.

In the Clintonian precincts of the Arkansas Democratic Party, Sen. Blanche Lincoln has the backing of both Bill and Barack. But if history is any guide, an incumbent who falters in the first round doesn’t bounce back the second time around. The runoff election between Lincoln and Lt. Gov. Bill Halter could be good news for Democrats. Among general election voters, Lincoln has dire ratings; Halter has pretty strong ones. In any event, the general election will be a tough race in this quasi-Appalachian state that’s never embraced Obama. But Halter has a reasonable prospect of pulling it off.

In Kentucky, where Republicans seemed sure to win the Senate contest, they may lose in November. Rand Paul, the newly minted GOP nominee who churlishly disdained a concession call from GOP Senate leader Mitch McConnell’s ordained candidate, is the son of the affable and radical Texas Congressman Ron Paul, who excited the fringe in his hopeless quest for the 2008 GOP presidential nomination. And like father like son; their positions are repugnant to mainstream voters. Rand Paul instantly attracted post-primary attention for his enmity toward the 1964 Civil Rights Act; Kentucky probably doesn’t aspire to be the next Arizona. Beyond this, the Democratic nominee, Attorney General Jack Conway, will assail Paul for his breathtaking collection of wackiness—his various proposals to dismantle or limit eligibility for Social Security and Medicare and to abolish the Department of Education, and his notion that a nuclear Iran isn’t a threat.

Once the Tea Partiers finish clinking their celebratory cups, Paul will discover what the humiliated Republican Senate leader knew all along: Hard on Medicare and soft on Ahmadinejad isn’t a persuasive platform in the hawkish Bluegrass State. The Democrat just could prevail here.

Farther up the Appalachian Trail, in a special election for Congress in Western Pennsylvania that had Republicans salivating, the Democrat decisively triumphed in a district that had rejected Obama in 2008. The surprised GOP rationalized that the result didn’t really count; the winner was “pro-gun and pro-life.” So are a lot of Democrats in Pennsylvania, including Sen. Bob Casey—and so are a lot of the Democrats in Congress who, after this special election, we know can be re-elected in the fall. The outcome was a signal that the new Associated Press survey, which shows Obama’s party with a five-point lead nationally, may actually be right. All politics is economics; as the economy improves, so will Democratic prospects for the midterms.

But the president can’t simply wait for history. He has to nudge perceptions and interpret events. This is Obama’s party—and the Campaigner-in-Chief has to carry an affirmative message that will define Democrats between now and November.

There is a temptation to be the anti-establishment voice; after all, that’s how Barack Obama overcame Hillary Clinton. But Obama’s task is not to second the inchoate demand for change that offers frustrated voters some psychic satisfaction—for example, Rand Paul’s ludicrous, economically suicidal proposal to balance the budget next year—but to convince the country that even while there’s a lot more to do, he’s already accomplished a lot, and the party of no would endanger it all. Like other extreme movements, the Tea Party draws its vitriol from economic upheaval; the president must create an alternative and compelling narrative.

On the economy, he can’t overstate the gains; but the time for soft-pedaling them is over. He needs to set the frame for Democrats: Because he and they risked tough decisions, the nation has moved from the edge of depression to the dawn of recovery. The job numbers will help, but Obama has to vivify the case—not in the Rose Garden, but in workplaces where new jobs are being created. He has to reach the optimism that lies beneath the anger and anxiety, the optimism that is the essential character of America: Yes, things aren’t yet good enough, but this country is doing better, and the best days are still to come. And there’s the other side of the choice—that the party of no would have led the country deeper into the ditch, and would take us back now.

Similarly, on health care, he should go out and meet with families whose 20-something children are now being covered by their parents’ health insurance—or whose sons and daughters are no longer being denied coverage because of a pre-existing condition. And then Obama should ask: Do Americans really want to leave these families, their own families, unprotected by turning power over to those who advocate repeal?

On financial reform, he must finish the job and claim credit for overturning the old order of speculation and special interest dominance—and doing so over the opposition of the party that said no to change and yes to economic royalists.

Only the president can shape and advance this alternative narrative. And along the way, if I may invoke a phrase for which I was criticized during the 2000 Gore campaign, Obama can continue to be—he has to be—the tribune of “the people, not the powerful.” The debate over Wall Street reform has set that stage. But the president can’t afford to litter it with crosscutting concessions to Washington and business as usual. What in the world was Interior Secretary Ken Salazar doing in his recent congressional testimony when he appeared, uncomfortably and evasively, to side with the oil industry in favor of limiting its liability for oil spills? This is no time for bureaucratic parsing; let the other party stand, as it habitually does, with Big Oil.

Finally, don’t assume the midterm elections can be survived by “localizing” each of them. That is a recipe for defeat. Democrats will suffer losses in 2010, but the outcome will be very different from last week’s prognosis. Democrats will control Congress next year—if Barack Obama dares to campaign, week in and week out, for the progress that has been made, the change that is underway, and the recovery that must not be put at risk.

In this era, the tide can turn quickly; look at last year’s August of discontent. It was possible to feel the political currents shifting again Tuesday night. With the political moment poised to change in his direction, it is now for the president to capture the moment—and the momentum.