When politicians start talking about bombing Iran, the price shoots up (pun), when Iran threatens to blockade oil routes, the price goes up more. When Europe or the US show lagging growth, the price drops. How does this happen?
It's not Obama on a ladder posting new gas prices. It's oil traders and oil speculators. Oil is a global commodity traded like soy beans, coffee, corn, etc. Supply is pretty close to demand so fear, doubt, uncertainty in political and economic areas can have a dramatic effect on oil prices world wide.
Add to that hopper the normal summer maintenance shut down of domestic gas refineries that limits supply.