WASHINGTON – The American economy is showing a little more pep in its step, the government reported Friday, but not enough energy to help bring down high unemployment or put the country on the road to sustained and widespread prosperity.

The nation’s gross domestic product — the total value of all goods and services produced inside U.S. borders — grew at a modest annual rate of 2 percent in the third quarter, up from 1.7 percent in the second quarter, the Commerce Department said.

Even though the United States is at least technically in the process of recovering from the worst recession in decades, the slow growth rate, high unemployment, the devastated housing market and widespread uncertainty over the future have seeded clouds of political resentment that shadow next Tuesday’s congressional elections — especially for Democrats, who control both Congress and the White House.

“The most striking thing about today’s report on gross domestic product is that it shows that the U.S. economy is still smaller today than it was when the recession began — even after more than a year after the recession officially ended,” EPI economist Josh Bivens said.

“This remains an historically slow recovery. Never since (World War II) has it taken so long to recover to pre-recession levels of GDP,” he said.

Stronger private spending powered the latest gain, an encouraging sign as retailers head into a critical holiday season.

“Consumers look a little more willing to spend,” said Shawn DuBravac, chief economist for the Consumer Electronics Association in Arlington, Va.

Business investment, too, was solid in the July-to-September period. Companies’ spending on equipment and software again rose by double digits, although at a slower pace than in the second quarter, and investment in offices and other commercial buildings posted the first upturn after eight straight quarters of decline.

What’s more, federal government expenditures continued to add juice to GDP growth.

So why wasn’t U.S. economic output stronger than 2 percent?

In a word, imports.

Although American exports were up in the quarter, imports rose at an even faster clip. And the resulting trade deficit, in effect, amounted to a halving of the GDP growth rate in the third quarter.

“It does say that we continue to basically consume more than we produce,” said economist Lynn Reaser of the National Association for Business Economics.

To be sure, exports are helping boost overall GDP, she said, and import growth is not a bad thing, as it reflects stronger American demand. But, she added, “We’ve got to do something about the trade deficits.”

Foreign trade and jobs have become a dominant campaign topic in the run-up to Tuesday’s elections. On a trip to Asia next month, President Obama will aim to open up foreign markets and boost sales of U.S. goods overseas, which would create more jobs at home.

Obama referred to the GDP report Friday during a visit to a metal shop in Maryland, where he spoke about the economy and boasted of cutting taxes 16 times for small businesses.

“Instead of providing tax breaks for companies that are shipping jobs overseas, we’re giving tax breaks to encourage companies to invest right here in the United States of America — in small businesses, in clean energy firms, in manufacturers, in businesses like this one,” he said at Stromberg Metal Works.

The president then renewed his push for a proposal for accelerated tax write-offs for business investments for equipment.

“The reason this company is able to compete against low-wage countries, against non-union work forces, is because it’s got better equipment and it’s got more skilled, better workers,” he said.

Friday’s economic report isn’t likely to change companies’ outlook for the economy or give them more reason to beef up hiring. The GDP data was in line with expectations, painting a picture of an economy that faces a reduced threat of falling back into recession but that is nonetheless plodding along at an unsatisfactory speed.

“The pace of growth is still too weak to get a real recovery in the labor market … and that’s the key ingredient to a sustained recovery that’ll lead to more consumer spending and more support for the housing market,” said David Regan, a senior investment specialist at JPMorgan Private Wealth Management in Los Angeles.

“We are seeing better spending data especially for higher-income (households),” he said. “What we’d like to see is that spreading” to other groups.

The latest GDP figures reinforced widely held expectations that the Federal Reserve on Wednesday will announce a new round of government bond purchases to drive down long-term interest rates and stimulate economic activity. Without knowing the size and other details of the expected stimulus, economists were divided on how much bang it might provide.

The hope is that it will spur more refinancing among homeowners and borrowing from businesses. And with the dollar weakening in expectation of a flood of new money, it should help U.S. exporters and the trade imbalance.