Here is what determines the cost of gasoline in the USA:
OPEC - the cartel members (countries) decide on how much capacity they will deliver, which is control of the supply side of the equation. The largest suppliers in the world belong to OPEC, including our "friends" the Mexicans.
Purchasers of crude oil - this includes oil companies, chemical companies, commodities traders, etc. Anybody with cash can purchase oil futures on the commodities market. They are betting that the price will continue to rise and sell to the highest bidder.
Refineries - There is a lot of oil on the international market, but all buyers must compete against eachother. The present refining capacity in the USA could be seen as thus: a 55 gallon barrel of oil with a straw sticking out of the bottom. The straw is US refining capacity, which has been stagnant since the 1970s due to the loony left and envirowhackos. We are now actually importing refined gasoline from Mexico because of this.
By far, the greatest culprit for this recent skyrocketing gas price is the US government. It is simply the weakening Dollar compared to other currencies. Profligate spending by the government is the major problem. They are printing Dollars like they are going out of style (they are) to pay for useless crap like the recent "stimulus package income tax rebate". If you flood the market with too much of anything, the value decreases; works with corn, coal, and oil, also. The artificially low interest rates forced by the Federal Reserve make money cheap to borrow.
I lived through this exact same thing in the 1970s. Bush and the Congress are doing the same things that Carter, Ford, and Nixon and the Congress did back then. It resulted in what has become known as "stagflation", where easy money caused high inflation to go along with a stagnant economy (nobody was investing in business because inflation and taxes were so high; they invested in commodities, instead). It took the disaster of Carter and the election of President Reagan to turn things around, which has resulted in 20+ years of steady growth (until now).