WASHINGTON — Americans are growing more optimistic about the economy and President Barack Obama’s leadership, creating a significant obstacle for Republican rival Mitt Romney five weeks before Election Day.

Even with unemployment above 8 percent for a 43rd straight month, polls find voters taking comfort in modest signs of economic progress, from a solid jump in consumer confidence this month to steady gains in home prices. Surveys show Obama opening leads over Romney in several key states, thanks to voters such as Jim Young, 62, a retired engineer from eastern Iowa.

A political independent, Young says Obama’s policies have eased the nation’s pain as the recovery plods along.

“The markets have been doing quite well,” Young said. “So, personally, things are going well, and we can’t complain.”

Interviews with voters in vital swing states and opinion polls suggest Romney inadvertently played into Democrats’ long-running efforts to paint him as an out-of-touch plutocrat when a secretly recorded video showed him saying 47 percent of Americans consider themselves victims who depend on government care.

“I think Obama understands the importance of a strong middle class and he wants to do more to build the middle class,” said Nash, 33, a chef.

Whether the video played a big role or not, Obama is leading in polls in Ohio, Florida, Virginia and elsewhere. Romney’s backers are struggling to change the momentum in a race shaped in large part by voters’ perception of the economy and their overall view of who would do a better job for the middle class.

“Sometimes there is a tipping point in politics where the cumulative effect of several things — and one singular defining event — can flip voters in one direction,” said Republican pollster Steve Lombardo. “I think that was what did happen with ’47 percent.’ It came after two bad weeks for Romney and crystallized voter perceptions, driven by negative ads, that he only cares about rich people.”

Obama aides are quick to note that the election is far from over. The Romney team hopes the debate Wednesday in Denver — the first of three in October — will enable the former Massachusetts governor to alter the campaign’s dynamics.