As you may note in our “about us” page (see the link above), Radical Reference’s site exists to “support activist communities, progressive organizations, and independent journalists by providing professional research support, education and access to information.” So, our main mission is to provide research assistance for and about social change and issues, broadly defined. At the same time, our question portal is open to everyone, and we have several examples of this sort of popular culture question. Librarians are naturally curious, and many of us are interested in language, so questions about etymology – the history and origin of words and phrases – have occasionally been explored on this site.
The Oxford English Dictionary, which you can find in many libraries, is the best source for dating usage, though it can't always help us understand why a word came to be used the way it does.
The use of "gas" for levity and enjoyment goes back to two uses. The first is the expression "everything is gas and goiters," which is first found in print used by Charles Dickens in 1839, meaning quite satisfactory. The more direct origin of the current (well, mid 20th century) usage is from Irish slang where gas meant joke or frivolity, found used in print by James Joyce in 1914. The usage seems to have been picked up by the African American community in the US in the "Jazz Age," and the expression "it's a gas" is first found used in print by James Baldwin in 1957.
So this tells us a lot about when, but not a lot about why. We may speculate that there is some connection to the use of nitrous oxide, also know as "laughing gas," for medical and recreational purposes early in the 1900s, but there is no direct link supplied by the OED to support that hypothesis.