Electricity is vital to both ends of the gasoline chain. As stated above, you need it to run the pumps (and computers that control and track purchases). Worst case you could do with out payment systems, take cash and run the pumps. The thing is, I have seen a few of these stations when I lived in CA. I know the status of the state grid is stressed and will become more so as time goes on. I dont know if those units are battery backed up though. If they are not and the power fails into evening or nights, YOU STILL ARENT GOING TO BE ABLE TO PUMP. And therein lies the real significance to a days-long regional collapse of the grid: with no power to run gas stations, all long distance travel ceases pretty quickly. I mean, if your tank will let you go 300 miles before a fill up and the power is out for 600 miles, now how are you going to do that? Id like to think the solar panels are going to be an answer to this, but without some backup for the backup, its not going to happen.
Just as important, electricity is VITAL to the refining of Oil into gasoline and other products. I had a good conversation with an SCE planner last year and he told me that refiners are some of the utility's largest customers, taking the electricity at the 220KV level. Constant power is required for this task and a single power failure can lead to this:

Emergency refinery flaring. Not only is it polluting, its wasteful. After the power comes back on, it can take a day or more to restart the refinery. So if power is regularly being interrupted to refiners, you can bet the amount of finished gas and diesel will decline. With markets stretch tight, that translates to a quick local gas spike.