Liquid gasoline does not have anywhere near the energy of TNT, or even a battery for that matter. It contains basically zero releasable energy. It needs oxygen or another oxidizer to react with to actually release any energy. TNT and batteries' energy density calculations include the oxidizer and the oxidizer is in close proximity to the fuel (molecularly so in the case of TNT). If you 10x the "energy content" of gasoline it's still rate limited by access to oxygen. If you 10x the energy density of a battery (the type with the oxidizer contained within the battery, not a fuel cell or metal air battery) you've got 10x the energy ready to be released quickly if oxidizer and fuel mix in unfortunate ways
Energy capacity vs. energy release rate, or energy vs. power, tends to follow an inverse relationship, at least within similar domains.
The fuels which afford the highest rates of storage tend to release it more slowly. Chemical explosives typically have about 1/10 the energy storage capacity (by mass) of fuels, as several people have pointed out.
Similar relationships exist for other forms of energy storage. For electricity, fuel cells, chemical cells ("batteries"), flywheel / reaction storage, and capacitors tend to offer a trade-off between total storage capacity and reaction time. Capacitors can react at intra-phase rates (that is, within a single 60Hz power cycle), whilst batteries and flywheels can take longer to come online.
See for example: "Battery Parameters" <https://www.monolithicpower.com/en/learning/mpscholar/batter...>.
"Liquid gasoline does not have anywhere near the energy of TNT,"
Energy density of gasoline is approximately 44 to 45 megajoules per kilogram.
Energy density of TNT is approximately 4.184 megajoules per kilogram.
It's an interesting discussion, because if you assume access to atmospheric oxygen, gasoline is MUCH more energy dense.