There are only about 20 gas stations in San Francisco. You can't have a city without gas stations; they're just as essential as housing.
Manhattan has ~1 gas station per 42,000 residents, and it seems to be doing just fine. Back of the envelop calculation puts the San Francisco ratio to ~1 gas station per 43,000 residents, so it is about on par with other dense areas of the US.
Google Maps found more than 20 in the southeastern neighborhoods alone!
I don't mean to argue from anecdotes, but I've never known anyone who lives in San Francisco and owns a car to complain that gas stations are particularly rare or hard to find or access here. (They may often complain about parking, but not as much about gas stations.)
Manhattan has ~1 gas station per 42,000 residents
Don't city buses and the major cab fleets have their own private fuel distribution? They represent a huge percentage of passenger-miles.The buses certainly do.
(https://goo.gl/maps/vN2dH4zPd8U2 scroll till you see the Circle K)