Battery power never needs to become as energy dense as gasoline - only 1/4 of that - to compete.
I won't pursue this further beyond noting that even this would imply a tenfold improvement in energy density for batteries. If all the other (in my opinion insuperable) problems were overcome, this would give a 777 a maximum range of 2000 miles at most. Even that supposes that the efficiency of an electric motor remains at 90% by the time you have driven a propellor with it. So no transatlantic aviation would be possible.