First of all, gasoline is used because it is very good at being ignited by a spark, and it contains a lot of chemical energy. So on the face of it, a spark could ignite gasoline vapours in the air, and a vehicle with sufficient static charge could produce a spark if suddenly grounded.
It is possible, and extremely rare. Two things need to happen before the gas will ignite.
- The vapour pressure of the gasoline needs at the right level. "If the gasoline fumes are between 1.4% (14,000 ppm) and 7.6% (76,000 ppm) then any sort of ignition source, i.e. spark of some kind, could cause the atmosphere to ignite or explode. "source
- There needs to be a sufficient static charge on the vehicle, and it needs to be grounded to produce a spark.
Typically, 1. will not be an issue unless there is a spill on the ground that was not properly cleaned. 2 is certainly possible, particularly in dry conditions.
This article summarizes several sources. Of interest is this interesting breakdown of fueling accidents:
50% happen when the person returns to the vehicle during refueling and leaves the vehicle door open
29% happen when the person unscrews the gas cap
21% happen for unknown reasons - theories include new chemical used in tires, more electronics in cars, seat fabrics, and more volatile fuels
78% are women who return to the car to put a credit card into their purse, get money, write a check, get warm, check on the kids, write down odometer reading, apply lipstick, or use cell phone
The first three bullets add to 100%, so I'm not sure what the 4th stat is all about.
I don't know why the vehicle door being open is a factor, but returning to the vehicle is a common factor in fueling accidents. (Apparently being female is a factor as well.)
The above article also states that there are about 100 fueling accidents a year out of 11-12 billion fuelings in the US. So it is rare.