It’s short for “gasoline”, which doesn’t have anything to do with “gas” as opposed to “liquid”.
In 1862, a guy named John Cassell was selling “Patent Cazeline Oil” for lighting. Others then started offering their oil under the brand name cazeline, Cassel put up a fight, and people began to differentiate between the actual Cazeline and the fake “gazeline”.