The treatment helped. The patient is recovering. The doctor is still being accused of malpractice.

That, in a nutshell, is the story of the $800 billion stimulus package President Obama signed five years ago, the centerpiece of a code-blue effort to defibrillate the cratering economy.

Rarely in the annals of U.S. public policy has there been a greater disconnect between the real-world effect of legislation and its political-world perception.

Substantively, the stimulus was a success. Politically, it was a disaster. A month after the law’s passage, the Pew Research Center for the People and the Press found 56 percent support. Three years later, that number had dropped to 37 percent.

Consider what happened on Monday, the fifth anniversary of the legislation. Obama golfed in California and the White House figured it would wait until Wednesday to celebrate the moment. Republicans didn’t wait.

1 of 95 Full Screen Autoplay Close Skip Ad × Tom Toles on the economy View Photos A collection of cartoons about the state of the economy. Caption A collection of cartoons about the state of the economy. Tom Toles/The Washington Post Buy Photo Wait 1 second to continue.

“A classic case of big promises and big spending with little results,” House Speaker John Boehner proclaimed. “A tragedy to lament,” Senate Minority Leader Mitch McConnell wrote for Reuters. “It clearly failed,” thundered Sen. Marco Rubio (R-Fla.).

It took until midday for the White House to respond, with a blog post by Jason Furman, chairman of the Council of Economic Advisers. The stimulus, he argued, “had a substantial positive impact on the economy, helped to avert a second Great Depression, and made targeted investments that will pay dividends long after the Act has fully phased out.”

This lingering debate merits revisiting, both to assess the Republican clamor over the law and, perhaps more important, to consider why it tanked so spectacularly in the public mind and what the implications of that misperception are for the next recession.

Substance first. The stimulus represented a classic, and sensible, Keynesian response to recession, one that historically has been endorsed by both parties. As Time’s Michael Grunwald noted, in January 2009 a group of House Republicans, including now-Budget Committee Chairman Paul Ryan, voted for a $715 billion bill nearly as sweeping.

The stimulus wasn’t perfect, but its chief flaws were dictated by political realities. Nearly a third was devoted to tax cuts, which are less stimulative than measures such as unemployment benefits because less is immediately spent. If anything, given the depth of the crisis, the measure should have been bigger.

Likewise, the stimulus alone didn’t right the economy — credit here goes to the Federal Reserve, the Troubled Assets Relief Program and the auto industry bailout — but it helped. The White House calculation that the law saved or created 1.6 million jobs a year for four years comports with estimates from the Congressional Budget Office. Without stimulus spending, more than 5 million additional people would have slipped into poverty in 2010, at the height of the law’s impact.

A harder question is whether the fiscal bump was worth the huge price tag. Because the spending was temporary, the White House noted, the stimulus added less than 0.1 percent of gross domestic product to the long-term fiscal gap.

Even that calculation “may overstate the true cost,” the White House argued, because direct gains in economic growth covered a quarter of the cost. More of the cost could be recouped in long-term growth generated by the nearly $300 billion in infrastructure, health care, worker training and other spending.

So what went wrong — and what does this mean for the future? Part of the negativity reflects the self-inflicted wound of the White House’s mistaken projection that the stimulus would keep the unemployment rate below 8 percent. When the rate rose to 9.5 percent, the White House was tagged with the burden of a broken promise, notwithstanding the accuracy of its argument that the depth of the crisis was greater than anticipated.

Part reflects the understandable media focus on the unavoidable stupid projects inherent in such mammoth spending; the Wall Street Journal editorial page this week pointed to a $219,000 study of college “hookups.”

Part reflects the sheer breadth of the law. Much like health care, it had so many moving parts — tax cuts! electronic health records! — few people could remember what it did, no less assess how much worse matters might have been without it. Meanwhile, the Republican attack was straightforward: The economy hasn’t recovered, hence the law failed.

Which leads to the larger concern: What happens next time? Stimulus spending has long been accepted as a crucial piece of the policy toolbox in a downturn. If Republicans have succeeded in tarnishing that tool along with the president who wielded it, it’s the nation that will suffer needlessly when the next recession hits.

Read more from Ruth Marcus’s archive, follow her on Twitter or subscribe to her updates on Facebook.