Thats actually not true. Gasoline is a stored energy. You can have a tank of gas in your car for a year and still start it up. The combustion engine cycle of a modern engine efficiency (conversion of heat to useful work) is about 70% as I recall from Mech engineering classes 40 years ago. The electric power grid does not store energy. It burns coal, gas, or some other combustible, or relies on hydro-electric or nuclear (which we dont build anymore) or unreliable wind, to generate current that is available for use right now, but not storable on the grid. (You can store some charge in large capacitors, buts thats more to smooth/regulate the voltage than to store energy)
The grid must have enough power to handle the consumer load at any given time. The efficiency of maintaining that available load capacity to charge an electric vehicle is not nearly as good as a simple can of gasoline.
This is why the all electric car pushed as 'green' is such a scam. Its really not saving energy. A hybrid makes a better case for efficiency, but is still very expensive and may never break even in costs.
So here is my simple minded understanding and trying to understand the whole cost picture. This list probably be applied to both EVs and petroleum equally.
1. Costs of extraction. Include wars in the ME to fight for resources. This applies to petroleum.
2. Cost of shipping.
3. Cost of distillation.
4. Cost of storage.
5. Cost of mixing additives such as ethanol.
6. Cost of distribution, again.
7. Conversion efficiency. Power required to move heavy hundreds of heavy objects down the road in one day.
When it becomes interesting is when you consider nuclear.