The vast majority (70%) of electricity in the US does not come from coal, and coal is even less used in states where electric cars are popular/encouraged. Over 99% of electricity generated in my state (NY) does not come from coal.
Not to mention that when you use gas in a car, a lot of it is wasted. When you use the grid to power electric means of transportation, like trains, that energy is evenly distributed as needed, and plants will increase or reduce production in accordance to estimated demand.
Another important consideration is pollution. If you burn a polluting fuel directly in the car, the pollution is released where the car is, which is generally where a lot of people are.
You can reduce the emissions by adding technology to process the combustion products to clean them up before emitting them, but you are limited by the fact that your cleanup technology has to be small enough and light weight enough to include with the car.
If you burn that same fuel remotely to make electricity, and use that electricity to power the car, now the pollution is being emitted at a fixed location.
We can pick that location to minimize the harm from the pollution that is emitted, and we can use far more effective cleanup technology at a fixed plant than we can on a vehicle.
At the expense of many layers of defensive mechanisms which a non-trivial number of people illegally modify, and I'm curious how close to "nil" it really is.
My understanding is that, at least in the context of local polution emissions (mostly smog related?) is that the difference between emissions between electric and gas cars is dwarfed by the pollution effects of rubber and concrete particulate matter created by driving.
I'm not entirely sure how accurate my knowledge is though, it's based on a few sort of tangential comments that connected some other data points I know, and not from any one source I can cite.
Also, the impression I got was this ignores things like leaking oil, which isn't measured by my state's emissions test. So I'm not trying to make claims about overall pollution effects between gas and electric.
Also as the energy mix in the grid gets greener, everything on the grid takes free advantage of the increased efficiency. If your state adds a giant solar array and spins down a coal plant, you don't have to do anything to get that overall cleaner energy into an electric car.