It's not about some new breakthrough to make batteries as cheap or energy dense as gas, it's a steady YoY improvement and steady decline in prices.
Lithium batteries where developed in the 70's didn't get released until the 90's and has steadily improved since then with a big cost decline in the last few years.
They are currently up around 300 wh/kg with a theoretical peak of around 2600 wh/kg with sulfur cathodes there is still plenty of headroom for further improvement. At around 2000 wh/kg it roughly equivalent to a diesel drivetrain power density if my math is right.