The price of the gasoline at the pump has mostly to do with supply and demand. Going back to our school days, we learned that if supply increases more than demand, the price of the commodity (oil and gas) will decrease. Inversely, the price will increase when supplies are less than demand. For former, has been the new normal since production from US shale oil production ramped up back in 2012. This caused the price of oil (and in turn, gasoline) to decrease. There were a few bumps in the price, i.e. when the US lifted the ban on exportation of unrefined oil products.
With the on slot of this horrible and devastating hurricane season on regions that are key in the oil and gas industry, the production, refining and transportation of oil and its refined products slowed down if not suspended for a duration of time. The takes time to recoup and from these losses.
The image below shows the breakdown cost that makes up a gallon of gasoline/diesel, sources from the EIA.gov site, the Energy Information Agency.
With the supply slowed due to the hurricane season, along with the “hysteria” around the lack of gasoline, brought on a perfect storm for gas prices to increase slightly. Although, it is prudent to note that even with these current inflated prices, we are still paying much less at the pump then we were six years ago. See the annual average cost of gasoline in this chart below from https://www.eia.gov/dnav/pet/pet_pri_gnd_dcus_nus_a.htm.
This is the short answer for the current gasoline prices, but there are more resources to consult for a deeper look. Links are below. Also, we are working on a post about what dictates the prices of oil, which has a direct correlation with the price of gasoline.
External Resources:
Energy Information Agency: https://www.eia.gov/energyexplained/index.cfm?page=gasoline_factors_affecting_prices
American Fuel and Petrochemical Manufacturers: https://www.afpm.org/how-are-fuel-prices-determined/
Forbes contributor, David Blackmon: https://www.forbes.com/sites/davidblackmon/2017/09/18/the-oil-and-gas-situation-post-hurricane-outlook/