It took months for President Biden and House Speaker Nancy Pelosi to bring the president’s infrastructure bill to a finish line that kept receding.

House Democrats, holding the narrowest of majorities, wrote a new chapter in the annals of winning ugly on Friday. Their feuding factions, deeply mistrustful of each other, threatened to commit collective suicide by striking a crippling blow against their own leader’s program. By the hour, they fed their least favorite trope about their party’s proclivity toward disarray.

And then, shortly before midnight, success happened. With five middle-of-the-road Democrats providing assurances that they would eventually support a second bill to strengthen the government’s support system for working families and combat climate change, the House voted 228 to 206 to invest $1.2 trillion in rebuilding the nation’s physical plant.

In the end, only six progressive Democrats voted no — still suspicious that their more conservative House and Senate colleagues would block or eviscerate the social spending bill the rebels value more. Those defections were more than offset by 13 House Republicans, most of whom Pelosi, still the MVP of vote-counting, knew would come over as long as enough members of her own party voted yes.

And on Saturday morning, one year and three days after the election that brought him to power, Biden calmly claimed the victory he insisted he always knew would happen.

He executed a quick pivot from the protracted and chaotic process that damaged his party’s standing, and his own, to what his program would actually do. For roads, bridges and transit. For electric-charging stations and broadband access in the countryside and small towns that had mostly voted against him. For cleaner water and a cleaner electrical grid.

Follow E.J. Dionne Jr.‘s opinionsFollow

And Biden wanted everyone to notice that while he delivered, his predecessor had talked about infrastructure to the point of parody and had only an unfinished border wall to show for it.

The triumph came at the end of a week that brought very bad news to Democrats in Tuesday’s elections and far better tidings on Friday in the form of a rip-roaring jobs report. Hopes that the pandemic might be on the verge of containment were bolstered by news of a pill that shows great promise in nearly eliminating deaths and hospitalizations from covid-19.

Yet whether this moment will be a turning point in the fortunes of Biden’s party depends not only on whether the good tidings keep rolling in — including, yes, the passage of that second bill — but also on whether Democrats can deal with a paradox of American politics that continues to haunt them.

The party of Franklin D. Roosevelt certainly still sees itself representing the interests of those who toil for wages. Biden returned to them again and again in his White House victory lap.

“For all of you at home who feel left behind and forgotten in an economy that’s changing so rapidly, this bill is for you,” he declared. And he added a turn of phrase to his distinctive rhetorical arsenal: “I am so tired of trickle-down economic theory that I’m trickled out.”

Yet as political divisions have come to be defined less by economics and more by issues related to culture, race and immigration, the Democratic Party’s base of support has shifted. It has moved sharply up the class ladder, especially when class is measured by education levels.

The other side of the paradox is that Republicans still see themselves as the party of business and lower taxes for the wealthy — Biden’s “trickle down” — even as their core support rests increasingly on voters with less formal education, Whites especially but not exclusively.

This leads to the spectacle of elite conservatives pretending to be paladins of the masses. The Economist offered the telling observation this week that the “anti-elitism fervor that has captured the right is largely a creation of rich Ivy Leaguers.” The latest member of this exclusive set: Harvard Business School-educated multi-millionaire Glenn Youngkin, Virginia’s governor-elect.

It was always the political task of a president proud to be called “Middle-Class Joe” to call the bluff of this plutocratic populism.

His idea was not to break with the party’s liberalism on race and culture. Rather, Biden would persuade “the hard-working middle-class folks” he addressed Saturday that his programs had far more to offer them than the other side’s trove of culture war bombast could ever deliver.

Rancorous Democrats would do well to recognize what Tuesday’s elections made clear: They are a long way from making this sale.

First, they need to pass the companion measure, Biden’s Build Back Better bill. As important, they must let people know what it’s in it, from help with paying for child care to expanding access to health insurance. They have to persuade Americans that this is not the socialist spending spree of Republican imagining, but, as Biden keeps saying, a “blue-collar blueprint.”

If Democrats fail, the future of politics will belong to the pampered populists who love nothing better than to divide the nation from the comfort of their country clubs.