Just over half of the cost of a gallon of gas connects directly to the price of crude oil, which can fluctuate widely. The rest of the costs are more stable.
(Please use a modern browser to see the interactive version of this visualization)