Below are some articles on US oil refining capacity that are very interesting and very timely. Each looks like it is a recent article associated with the current high price for gasoline. The point is that each of these articles is from 2005 or before. Make no mistake oil refining capacity issue has been discussed for some time.
U.S. refiners stretch to meet demand
A push to build new US refineries
U.S. Shortage of Oil Refining Capacity Called Critical
Yes, the price of gasoline depends on the price of oil, but gasoline markets are regional and depend very much on regional demand, inventories, transportation, and refining capactiy. A good discussion of the refining capacity in the US can be found in the study by ICF Consulting.