WASHINGTON – For all the talk of recovery, Americans are growing increasingly pessimistic about the economy as soaring gas costs strain already-tight budgets. So far, people aren’t taking it out on President Obama, a new Associated Press-GfK poll shows.

Even so, the survey highlights a central challenge Obama will face in his campaign for re-election. The president will have to convince a lot of voters who are still feeling financial hardship that things are getting better.

Obama’s approval ratings have held steady at around 50 percent over the past month. But the disconnect between negative perceptions of the economy and signs that a rebound are under way could provide an opening for Republicans at the outset of the 2012 campaign.

In the survey, just a sliver of Americans — 15 percent — said they believed the economy had improved over the past month, compared with 30 percent who had thought that in January. Only a third were optimistic of better times ahead for the country, down from about half earlier this year. And 28 percent thought the economy would get worse, the largest of slice of people who have expressed that sentiment since the question was first asked in December 2009.

“It’s in a poor state,” said Billy Shirley, 74, a Democrat from Commerce, Ga. “Everything’s going to the bad. Everyone’s spending more on gas, food, everything. The prices on everything are going up, and that’s hurting the nation.”

Recent economic indicators paint a more positive picture: The unemployment rate, though still high at 8.9 percent, has been declining, and consumer spending and personal income were both up last month. The gross domestic product was growing at an annual rate of 3.1 percent as last year ended.

Americans are acutely focused on their financial well-being, even as Mideast turmoil commands international attention.

And the foreign unrest is directly affecting them by boosting oil prices. More Americans — 77 percent, up from 54 percent last fall — now say gas prices are highly important to them.