Higher Gas Prices Cloud Obama's Re-Election Hopes : NPR
the article filled with opinion, concludes with this one
and this looks even more closely at politics and past gas price historyStill, as long as the economy seems to keep improving, Obama probably won't be hurt too much by the attacks "unless gas goes over $5 a gallon," Thurber said.
So if one looks to history for the answer, it is a mixed one that is inconclusive.Nate Silver of the FiveThirtyEight blog examined this issue in February 2011 just before the Republican presidential campaigns took off in earnest. It was at a stage when Obama was clashing with congressional Republicans who were accusing his energy policies of contributing to higher prices at the pump.
Silver found there to be, at best, a weak correlation between gas prices and presidential elections though he makes the important point that there isn't as much data as one might want; there have only been 16 presidential elections since 1948, the point at which he starts looking at gas prices, the GDP and election results.