As long as prices are free to rise, I wouldn't expect much in the way of gasoline shortages--at least not widespread, long-lasting ones.  But it's actually pretty easy to produce a local, short-term one.  In fact, it doesn't take much more than people worrying that there might be one.

Suppose one local filling station has a supply glitch and the local TV stations and local paper run with scary headlines over a picture of the "No gas" sign.  If that prompts any sizable fraction of drivers to stop in their local filling station for a precautionary extra fill-up, that could do it all by itself.

Think of it this way:  The average car's gas tank is about half full--for every guy who just filled up, there's another guy who's about to fill up.  Multiple one-half the size of the average gas tank by the number of vehicles in your city, then compare that to total amount of gasoline in all the filling stations in town.

Doing a back-of-the-envelope calculation for my town, I'd guesstimate that there's around 100,000 cars and trucks that use gasoline and that the average tank could probably hold another 10 gallons of gasoline if they went out for a fill-up.  So, that's a potential demand for maybe 1 million gallons of gasoline, if they all decided to top off their tanks.

A typical filling station might have tanks to store 25,000 gallons of gasoline, but of course their tanks are only half-full on average as well, so that means around 12,500 gallons per station.  So, the potential surge-demand of everybody deciding that they really ought to top their tanks off could drain some 80 gas stations dry.

Now, it's pretty unlikely for one overblown story about gas shortages to send everyone out to fill up their tank, and there's also probably more than 80 stations in town.  But these things can feed off one another--if a demand surge runs one station dry, the "No gas" signs at that station feed the surge by sending another batch of people off to fill their tanks.  That runs another couple of stations dry and so on.  At the same time, of course, everybody is doing all their ordinary driving--all this demand is in addition to the ordinary, everyday demand.

It might seem a little counter-intuitive, but my recommendation for dealing with this risk is that you keep your tank full.  (This is in keeping with my general advice on the ethics of hoarding--as long as you're buying what you're going to use in the reasonably near future, you're not contributing to the shortage.)  

It means that you won't contribute to the problem--your tank is already full (or nearly), so you don't need to rush out for a fill-up if gas shortages hit the news.  It also means that you won't be severely impacted by the minor, local, short-term supply disruptions that are an entirely predictable consequence of the kind of supply shocks that are pushing prices up.

Frankly, we'd all be better off if gasoline were a bit easier to hoard--it'd mean that more people had a stockpile and wouldn't need to go rushing off to the filling station when news broke of possible shortages.  It's hard, though, to hoard more than what fits in your tank--storing gas in gas cans doesn't work well (the gasoline evaporates), plus it's dangerous (gasoline is flammable, explosive, and toxic).  A proper underground storage tank is expensive, and subject to considerable regulation.

As a practical matter, keeping your vehicle tank full is about as far toward hoarding gasoline as the ordinary person can go.  Fortunately, it's far enough to help considerably.

I'm old enough to remember the gas lines in the 1970s.  Those were largely caused by government controls on prices.  (Price controls are the classic way to create a shortage.)  If there are no price controls, I would would expect any shortages to be minor, local, and temporary.  But just because there won't be severe, widespread, and long-lasting shortages, doesn't mean that there won't be any.  An extra half-tank of gasoline makes it a non-issue if there's a minor glitch in gasoline distribution affects a few local stations.  If you let your tank get close to empty, that same minor glitch could see you driving on fumes, hoping that the next station has gas--and in no position to do comparison shopping if the price looks a little high.

On a previous post on a related topic, one commenter reported that the process of evacuating for Katrina produced spot shortages of gasoline.  Clearly, anyone trying to flee a disaster is better off if they can just go, without having to stop for gasoline--possibly having to wait in long lines.  In an emergency, some fraction of the gas stations may be inaccessible--fallen trees, flood waters, or the police blocking traffic some directions.  In addition, some stations may be closed because their workers have already evacuated or the power is out.  The stations that are open will be the first to run out of gasoline.

Of course, don't wait until there's news of gas shortages to take this advice.  That would make you part of the problem.  Do it now.