Gasoline is incredibly energy dense, as you point out, it’s very unlikely that batteries will approach it anytime soon.
Fortunately/unfortunately, so much of that energy in ICE cars is wasted as heat, so the effective gap to make EVs competitive is much smaller.