One reason they are called gas giants is because they are mostly composed of elements that are gaseous at Earth like temperatures and pressures.
Jupiter is primarily composed of hydrogen with a quarter of its mass being helium, though helium comprises only about a tenth of the number of molecules.
Jupiter's upper atmosphere is about 88–92% hydrogen and 8–12% helium by percent volume of gas molecules. A helium atom has about four times as much mass as a hydrogen atom, so the composition changes when described as the proportion of mass contributed by different atoms. Thus, Jupiter's atmosphere is approximately 75% hydrogen and 24% helium by mass, with the remaining one percent of the mass consisting of other elements. The atmosphere contains trace amounts of methane, water vapor, ammonia, and silicon-based compounds. There are also traces of carbon, ethane, hydrogen sulfide, neon, oxygen, phosphine, and sulfur. The outermost layer of the atmosphere contains crystals of frozen ammonia. The interior contains denser materials - by mass it is roughly 71% hydrogen, 24% helium, and 5% other elements. Through infrared and ultraviolet measurements, trace amounts of benzene and other hydrocarbons have also been found.
So Jupiter and Saturn are almost totally composed of hydrogen and helium, elements that are gaseous at Earth like temperatures and pressures. Of course the temperatures and pressures deeper inside Jupiter and Saturn are not exactly Earth like!
But the elements that they are composed of are commonly called gases even though they might be in exotic conditions such as liquid metallic hydrogen under the immense pressure and temperatures inside the planets. Most of us think of hydrogen and helium as gaseous elements, not liquids, or solids, or highly exotic forms of matter.
Thus Jupiter and Saturn are "gas giants".
A second reason they are called "gas giants" is historical. Famed science fiction writer James Blish wrote a science fiction story called "Solar Plexus", published in Astonishing stories, September, 1941. "Solar Plexus" was rewritten and republished in an anthology Beyond Human Ken, edited by Judith Merrill, 1954. The 1954 rewritten version contained the line:
A quick glance over the boards revealed that there was a magnetic field of some strength near by, one that didn't belong to the invisible gas giant revolving half a million miles away.
Science fiction readers who knew anything about the structure of giant planets thought that "gas giant" was a very fitting phrase to describe them. And some of them were professional astronomers. Thus the phrase began to be used by astronomers to describe the giant planets in the solar system.