Greenhouse gases are called as such because they -
A greenhouse gas (sometimes abbreted GHG) is a gas that absorbs and emits radiant energy within the thermal infrared range. Greenhouse gases cause the greenhouse effect. The primary greenhouse gases in Eah's atmosphere are water vapor, carbon dioxide, methane, nitrous oxide and ozone. Without greenhouse gases, the average temperature of Eah's surface would be about -18 degC (0 degF), rather than the present average of 15 degC (59 degF). The atmospheres of Venus, Mars and Titan also contain greenhouse gases. Ref : https://en.m.wikipedia.org/wiki/Greenhouse_gas