TOKYO—Toyota Motor Corp. said Tuesday it was nearing a major technological breakthrough in electric-car batteries, as the world’s second-largest car maker by sales accelerates its push to build all-electric vehicles.

The technology, a solid electrolyte, would enable smaller, lighter lithium-ion batteries, which theoretically could hold a higher charge—boosting the range of electric vehicles, according to the company.

Toyota...