The bottom line of this article from the NY Times is that rising gas prices tends to have small political impacts:
Gas prices influence voters indirectly, because rising prices can slow the pace of growth. But the influence is modest, because spending on oil and its derivatives makes up only a small part of the nation’s economic activity. Gas purchases account for less than 4 percent of household spending. Prices would need to increase by at least 28 percent to lift that share by a single percentage point. So far this year, they have jumped by 15 percent. ...
Rising gas prices also make Americans less confident in the nation’s economic prospects and less approving of political leaders, according to public opinion surveys. ... One study by a political scientist estimated that the impact of changes in unemployment was 27 times greater than the impact of equivalent changes in gas prices. ...
Gas prices exert an unrivaled hold on the public imagination. Americans spend more on gas than on almost any other single good, and the exact amount is hard to miss as the numbers spin by on the pump. It hurts to watch, but there is also little choice. People can substitute chicken for steak, but they still need to drive the same distance to work.
When prices rise, people wait to buy cars; they travel less; they buy fewer lottery tickets and spend less on child care, according to a study by Paul Edelstein and Lutz Kilian, economics professors at the University of Michigan. ...
The impact on happiness is even larger than the changes in spending, according to a 2010 study by researchers at the Brookings Institution, in part because people do not like uncertainty, and they do not know how high prices will climb. ...Since 1976, a 30-cent increase in gas prices over a three-month period has corresponded to a reduction of two percentage points in a president’s approval rating if other economic factors are held constant, according to an analysis by John Sides, a professor of political science at George Washington University. ...
A 2011 study of the impact of economic conditions on regional voting patterns found that the spike in gas prices in the summer of 2008 did give a small boost to Mr. Obama. Independent voters in areas where prices climbed highest reported a significantly more negative view of the health of the economy and were less likely to vote for incumbents.
But, I guess these small political impacts, combined with a hanging chad or two, can matter.