Last week the Ghost of Gridlock Present crossed paths in Washington with the Ghost of Gridlock Future. It makes for a spine-chilling tale.

Gridlock Present was haunting the Senate, where legislators dissolved into partisan warfare over a bill to fight human trafficking that most of them support.

That was scary enough. In some ways, Gridlock Future’s hovering presence at a little-noticed scene on the steps of the Capitol was even scarier.

There, on Wednesday, it became clear that the enforcers of Never-Compromise ideology are ascendant inside the Democratic Party, as they have been for years among Republicans.

Grover Norquist, meet Social Security Works.

The target of the day was Rep. Chris Van Hollen (D-Md.), who is running in a Democratic primary to replace retiring Maryland Sen. Barbara Mikulski.

Van Hollen is by any definition a liberal. He is among House Minority Leader Nancy Pelosi’s most trusted lieutenants. He may be the savviest federal budget expert in the Democratic caucus. And he has never supported cuts to Social Security.

But Van Hollen a few years ago called the Simpson-Bowles commission’s grand bargain for fiscal salvation “a good framework.” He didn’t embrace its specifics, but he understood that any deal to save the country’s finances would depend on Democrats accepting reforms in health-care programs in return for Republicans agreeing to revenue increases.

That concept was relatively uncontroversial then — President Obama agreed, too, though he also declined to embrace the specifics of Simpson-Bowles — and it remains true today. But to the Norquists of the Democratic Party, any hint of a whisper of a tentative inclination to consider reforms of Medicare or Social Security is heresy, and never mind the arithmetical realities of an aging society.

So there was Van Hollen last week at a news conference in support of a bill, introduced by Rep. John Larson (D-Conn.), that not only “saves” Social Security but expands it — to the tune of $3.1 trillion over the next 75 years.

“You don’t save Social Security by cutting Social Security,” Van Hollen dutifully said, as The Post’s Rachel Weiner reported.

Social Security is an essential and successful program that has lifted and continues to lift millions of elderly Americans out of poverty. It is by no means lavish; the average monthly retirement benefit is about $1,300. It must be protected.

But those monthly benefits are paid out of the taxes of working Americans, of whom there were more than five for every beneficiary in 1960. Today there are fewer than three workers for every pensioner. In 2030, the ratio will be two to one.

We could reshape those demographics at the margins, with a smarter immigration policy, and if we figure out how to make the economy grow faster, we could increase the size of the pie. But the essential fact isn’t going to change: A bigger and bigger share of that pie will go to health care and retirement costs for old people, leaving less and less for younger generations.

What would be the rational — and politically progressive — response? Raise taxes sufficiently to protect Social Security retirement benefits for the poor and middle class, but limit the burden on working Americans as much as possible, while redirecting some funds from wealthier beneficiaries and taxpayers to programs that young people depend on, such as Head Start, Pell grants and Medicaid.

Larson’s bill, to its credit, would fully replenish the underfunded Social Security Trust Fund. It would raise taxes on everyone and especially on the rich.

But it would increase benefits substantially for everyone, too, regardless of income — upper-middle class, upper class, gazillionaire-class.

This is no more progressive than Norquist’s tax-cutting ideology is conservative when it ends up laying waste to state university systems or impelling governors to mortgage the future to pay today’s bills.

On both sides, Never-Compromise trumps achievable progress. The “expand Social Security” movement undoubtedly began as a clever tactic: If someone is talking about cutting, we’ll propose growing, and at least we can meet at stasis. It took on a life of its own, on its way to becoming doctrine in any Democratic primary fight.

Meanwhile, any past indication of a willingness to work toward actual solutions has become a weak point, never to be forgotten.

After Van Hollen signed on to the expand-Social Security bill, the executive director of Social Security Works expressed partial satisfaction.

“We’re in full agreement,” Alex Lawson told The Post. But, he added, Van Hollen’s past willingness to entertain Simpson-Bowles “is going to be remembered as support for cuts to earned benefits, and it will take a lot of effort to try to unwind that.”

Remember that comment the next time you wonder why seemingly rational, intelligent legislators can’t seem to get anything done.

Read more from Fred Hiatt’s archive, follow him on Twitter or subscribe to his updates on Facebook.