Some gas stations put a pie graph on the pump showing the breakdown of costs. Taxes is nearly 50%. There are a lot of steps along the movement of gas (from well to pump) where the gov't taxes the exchange, adding up to a lot.
Now consider that nearly half your income goes to taxes (state, local, etc.): kick around the math a bit, and you'll find it actually works out to you having to earn nearly $5 to buy a little over $1 worth of actual gas - the rest goes to taxes.
Indirect taxes hit the corporations every step of the way. Even the extraction of the raw crude from the ground is taxed. They probably tax the exhaust from the vehicle's engine seven ways. Everybody pays, sometimes in multiples.