I don't remember where I heard this, but found out it's somewhat true.
If a gas station is closed for the night, you might still be able to get gas using a credit card of debit card.
I tested it out the other night coming back from Jerry's at a gas station where I normally stop since they have ethanol free gas. Store was closed, place was dark but when I went to fill up and used my credit card, the pump worked.
This is probably not true of all gas stations since I have talked to a few that shut the pumps down for the night, but, in a pinch it might just get you some gas in the middle of nowhere.
I normally pay in cash when the gas station is open but would suggest carrying a pre-paid credit/debit card if you don't have one for emergencies.