The roots of American liberalism are not compassion, but snobbery. That’s the thesis of Fred Siegel’s revealing new book, “The Revolt Against the Masses: How Liberalism Has Undermined the Middle Class.”

The standard account is a linear story: Government expansion starts with the Progressives of a century ago, accelerates through the New Deal and the Great Society, follows up with the Obama stimulus and ObamaCare.

Siegel says it’s more complicated than that. And he argues that literary figures contributed as much to the liberal mindset — maybe more — than policy wonks.

He depicts the Progressives as Protestant reformers, determined to professionalize institutions and tame the immigrant and industrial masses. Progressive projects included women’s suffrage and prohibition of alcohol.

But the many pro-German Progressives were appalled when Woodrow Wilson led America into World War I and by Wilson’s brutal suppression of civil liberties. And progressivism was repudiated in the landslide election of Warren Harding in 1920, at which point disenchanted liberal thinkers turned their ire against middle-class Americans who, in the Roaring ’20s, were happily buying automobiles, refrigerators, radios and tickets to the movies.

The novels of Sinclair Lewis, the journalism of H.L. Mencken and the literary criticism of Van Wyck Brooks heaped scorn on the vast and supposedly mindless Americans who worked hard at their jobs and joined civic groups — Mencken’s “booboisie.”

These 1920s liberals idealized the “noble aspiration” and “fine aristocratic pride” in an imaginary Europe, and considered Americans, in the words of a Lewis character, “a savorless people, gulping tasteless food,” and “listening to mechanical music, saying mechanical things about the excellence of Ford automobiles and viewing themselves as the greatest race in the world.”

This contempt for ordinary Americans mostly persisted in changing political environments. During the Great Depression, many liberals became Communists, proclaiming themselves tribunes of a virtuous oppressed proletariat that would have an enlightened rule. For a moment, idealization of the working man, but not the middle-class striver, came into vogue.

But in the postwar years, what Siegel calls “the political and cultural snobbery” of liberals returned. He recounts the derision of historian Arthur Schlesinger, Jr., and economist John Kenneth Galbraith — Cambridge neighbors after the war — for Harry Truman, the onetime haberdasher and member of veterans’ groups and service clubs.

Liberals since the 1920s have claimed to be guided by the laws of science. But often it was crackpot science, like the eugenics movement that sought forced sterilizations. Other social-science theories proved unreliable in practice. Predictions that the world would run out of food and resources turned out to be wrong. In the 1970s, people were told global cooling was inevitable. Now it’s global warming.

As Daniel Patrick Moynihan pointed out, social scientists didn’t really know how to eliminate poverty or crime. Policies based on middle-class instincts often worked better than those of elite liberals.

Some Democratic politicians learned lessons from this. Bill Clinton pursued welfare reform and honored, in rhetoric if not always behavior, people who work hard and play by the rules. President Obama, in contrast, has built a top-and-bottom coalition — academics and gentry liberals, blacks and Hispanics, with backing from taxpayer-funded public-sector unions. In 2008, Obama carried those with incomes under $50,000 and over $200,000, and lost those in-between.

The Obama Democrats passed a stimulus package tilted toward public-sector unions and financial regulation propping up the big banks. Those at the top got paid off. Less has gone to those at the bottom. Those in the middle have seen their health insurance canceled by ObamaCare and sit waiting for healthcare.gov to function.

Suddenly, this “aristocracy based on talent and sensibility,” in Siegel’s words, seems to be discrediting its own policies — and its conceit that it is uniquely fit to govern.