A gas is 'defined' as a greenhouse gas if it allows the passive passage of Infra-red radiation through the atmosphere, into the stratosphere, but, also inhibits the passage of IR radiation out of the atmosphere, hence creating a build-up of radiation, and therefore heat in the stratosphere, contributing to what is now known as Global-Warming.
Its a complicated issue to form an analogy for,
if you still need help I recommend reading any recent textbook on Environmental Geology, and on Environmental Chemistry.
Greenhouse gases are just gases that absorb light. Think of it like wearing a black shirt when a spotlight is pointed directly at you. Your black shirt emits heat in all directions, but you still warm up faster than if you were wearing a white shirt.