My guess is that back in the day... mid 1800s when they were first starting to play around with this stuff they called "oil from rocks" ( ie petra - oleum - petro being Greek for rock)(as opposed to long time used oils like "olive oil, corn oil, whale oil, etc) they were after heavy lubricating oil, and they were after kerosene for lamps.
In the early refining process there was that stupid stuff that would turn into vapor- just a waste product that had to be sipohoned off- because if you put it into a lamp the lamp would just explode- but if you siphoned it off it in a pipe it would revert to liguid.
They called this useless liquid-that-tended- evaporate-off-as-fumes "gas" (because that's what it wanted to be when exposed to open air)- oline (because its a useless cousin of kerosene). Hense "gasoline". Which became just "gas" for short.
But later on guys like Benze and Ford found a use for this gasoline stuff to power engines for horseless carriages.
So yeah. Its a liquid that we still call "gas" ( though in much of the world its called "petrol", or even "motor spirits" ( that's "spirits" as in distlled hard liquor, not the Holy Ghost kinda spirit).