Income inequality is taking a toll on state governments.

The widening gap between the wealthiest Americans and everyone else has been matched by a slowdown in state tax revenue, according to a report being released Monday by Standard & Poor’s.

Even as income has accelerated for the affluent, it has barely kept pace with inflation for most other people. That trend can mean a double whammy for states: The wealthy often manage to shield much of their income from taxes. And they tend to spend less of it than others do, thereby limiting sales tax revenue.

As the growth of tax revenue has slowed, states have faced tensions over whether to raise taxes or cut spending to balance their budgets as required by law.

“Rising income inequality is not just a social issue,” said Gabriel Petek, the S&P credit analyst who wrote the report. “It presents a very significant set of challenges for the policymakers.”

Stagnant pay for most people has compounded the pressure on states to preserve funding for education, highways and social programs such as Medicaid. The investments in education and infrastructure also have fueled economic growth. Yet they’re at risk without a strong flow of tax revenue.

The prospect of raising taxes to balance a state budget is a politically delicate one. States have used the allure of low taxes to spur job creation by attracting factories, businesses and corporate headquarters.

“If you’ve got political pressure to spend more money and pressure against raising taxes, then you’re in a pickle,” said David Brunori, a public policy professor at George Washington University.

Income inequality isn’t the only factor slowing state tax revenue. Online retailers account for a rising chunk of consumer spending, yet they often can avoid sales taxes. Consumers are spending more on untaxed services, too.

S&P’s analysis builds on a previous report this year in which it said the widening gap between the wealthiest Americans and everyone else has slowed the U.S. economy’s recovery from the Great Recession. Because consumer spending fuels about 70 percent of the economy, weak pay growth typically slows economic growth.

Some states are scrambling for new revenue sources. Pennsylvania has raised fees for vanity license plates and other auto expenses. Colorado and Washington legalized recreational marijuana, in part on the promise that the proceeds would be taxed.

Adjusted for inflation, government data shows that median household income rose by a few thousand dollars since 1979, to $51,017 in 2012, and remains below its level before the recession began in late 2007. By contrast, the top 1 percent of earners have thrived. Their incomes averaged $1.26 million in 2012, up from $466,302 in 1979, according to IRS data.

The combination of an increasingly global economy, greater productivity resulting from technology and outsize investment returns has shifted a rising share of money to the wealthy. Of all the dollars earned in 2012, more than 22 percent went to the top 1 percent. That share more than doubled since 1979.

Before income inequality began to rise consistently, state tax revenue grew an average of 9.97 percent a year from 1950 to 1979. That average steadily fell with each subsequent decade, dipping to 3.62 percent between 2000 and 2009.

State tax revenue growth has risen slightly since then as the economy has recovered and some states — California, Connecticut, New Jersey and New York, for example — have adopted higher top marginal income tax rates, according to S&P. In 2012, California voters backed a ballot measure to raise taxes.

That measure boosted California’s sales tax to 7.5 percent for four years and income tax rates to between 10.3 percent and 12.3 percent for seven years on income over $250,000. Plus, there’s an additional 1 percent tax on millionaires.

More than half the income tax the state collected in 2012 came from the top 1 percent, compared with 33 percent in 1993. And in 2013, state tax revenue in California surged 15.6 percent.

Seven other states also have raised top marginal rates since 2009. This marks a reversal of the trend from 1985 to 2009, when average top marginal tax rates across all states fell slightly.

The most affluent Americans typically receive most of their income from profits in stocks and other investments, rather than from wages. This means that swings in financial markets can cause state revenue to gyrate from year to year.

Some states — including Arizona, Florida, Nevada, Texas and Washington — rely primarily on sales taxes for funding. They’re more dependent on consumer spending and don’t benefit much from the gains that have flowed mainly to the wealthiest Americans.

Across all states, sales taxes account for 30.1 percent of all revenue, according to the National Conference of State Legislatures. Personal income taxes make up 36.6 percent. The rest comes from other sources, such as taxes on fuel, alcohol and cigarettes.

As consumers have spent more online and on untaxed services, many states have tried to tax things such as Netflix subscriptions and iTunes downloads. Washington state now taxes services at dating centers, tanning salons and Turkish baths.

Kim Rueben, a senior fellow at the Urban Institute, said the rise of untaxed purchases might have squeezed state revenue even if income inequality hadn’t widened.

“Sales taxes are being eroded by the fact that we’re moving to a services economy and people are buying far more on the Internet,” she said.

Research by Lucy Dadayan, a senior policy analyst at the Nelson A. Rockefeller Institute of Government, notes that income tax collections have become more volatile from year to year, making it harder for states to plan budgets, provide services and launch programs. She endorses an overhaul of state tax codes to produce a more balanced revenue flow.

But S&P says its findings suggest that the wealth gap derives from many factors and that state tax-code revisions don’t fully address the consequences.

“Changes to state fiscal policy alone won’t likely fix what’s wrong,” S&P concludes.