https://en.m.wikipedia.org/wiki/Electricity_sector_in_Norway
My understanding is that EVs are still usually a net win because
1. Power plants can benefit from economies of scale that individual cars cannot, making a gas power plant powering EVs better than individual cars running on gas.
2. As others have said, it is easier to upgrade power plants than all cars on the road.
Power plants are similar in terms of cost and time consuming to upgrade. There are around 30 million cars in the uk. Assuming an average electric car cost of £20,000 that equates to £600 billion and cars tend to be replaced every 15 years (average car age is 8 years). A powerplant costs about £2 for every Watt installed and the uk needs about 100GW or around £200 billion. A typical large scale nuclear or wind project can take 5 to 15 years to complete but on average a powerplant can last 50 years.
A better argument is that in some countries already a large proportion of electricity comes from renewable sources such as hydroelectric in Norway. Sadly this doesn't translate to the whole world: China is mostly powered by coal.
Well, gasoline also has "transmission losses": it takes energy to move large amounts of oil to refineries, then to fuel stations. Such energy is usually also fossil fuel based.
I don't know how to do the exact conversion; but what I've read over the last few years is that in most places in the US, an EV is cleaner than a gasoline car. The only places where an EV "pollutes" about as much as a gas car are areas that highly depend on coal.
Granted, if you put solar panels on your roof to offset your usage, you're about as clean as you can get.
It's likely that some of the electricity came from renewables and little from coal. Even if from oil, the big power plants are more efficient than your car's engine at converting oil to power. There are losses and I don't know how those compare.
Also the grid gets greener over time, whereas your car engine only gets less efficient over time.
My summary is that a big factor is the CO2 emissions of producing the battery pack which must then be offset. So it depends on size of battery pack, how the pack is used after the car is not used any longer, how much mileage you get out of the car, etc etc
E.g. a Tesla Model X will NOT be better than a tiny gasoline car (of course)
But TL;DR is EV wins for same class cars and for most power mixes, but not by a huge factor.
However, EV + solar/fusion/wind/batteries/.. is at least a possible path (if challenging) of preserving the current lifestylr. Burning fossil fuels is something we know we just have to stop doing 100% in some decades. So there really isn't much alternative to getting the adoption underway.
To those saying Norway has 98% hydro: Fine, but that doesn't change that the power would have been sold to Europe if we don't consume it here. Computing with the EU average mix seems more fair.
Also, car to grid is becoming a thing where car batteries provide power back to the grid when they are not needed. This can add a lot of flexibility to the grid and better utilization of capacity. IMHO, deploying GwHs of battery capacity on the roads in the next few years is creating a massive opportunity for electricity companies to improve their economics and decrease their dependence on gas/coal.