What we need to invent is cheap, dense, mobile batteries. No amount of blustering by Elon Musk can mask the fact that we can't store electrical power anywhere near as easily, lightly (meaning we need the ability to pack it up and move it around), and small. Yes you can fix it with $50k cars, but electrical cars could be $10k and even less if we assume magic perfect batteries. That'd be great and will get almost every gasoline car of the road.
Batteries are currently about 10% as dense either per liter or per kilogram. A bit of this can be made up because the infrasstructure to "burn" electricity is much simpler and therefore lighter than the infrastructure needed to burn gasoline. So let's say they're 20-25% as dense for locomotion purposes (this makes them not work for powering lights or factories or ... at night though). So we need batteries 4x smaller and lighter than current batteries. Assuming the current rate of improvement in batteries, that would require about 20-30 years (improvement per year is about 5%).
So that's just not good enough. Please invent something to fix it. If we can store energy efficiently, co2 release per year will stabilize probably on less than 10% of it's current value.