When exposed to a strong wind, a Gastly's gaseous body quickly dwindles away. They cluster under the eaves of houses to escape the ravages of wind.
(From  Bulbapedia) Gastly has no true form, due to 95% of its body being poisonous gas. However, it consistently appears as a black, spherical Pokémon surrounded by a purple haze. It has a wide, pink mouth with two visible fangs. Though its eyes seem to extend past its round body, visible eyelids surround them. The toxic gas surrounding the main body can induce fainting and suffocation, and is capable of enshrouding an Indian elephant within two seconds. Because it is mostly gas, Gastly will dwindle away when exposed to strong winds.
Gastly also has a playful personality, often frightening and playing pranks on people for fun. However, it has shown a willingness to preserve or pass on the memories of departed humans.
If Foresight or Odor Sleuth is used by an opponent, or the opponent has Scrappy, the effectiveness of Normal-type moves is 1× and the effectiveness of Fighting-type moves is ½×.
If Gravity is in effect, this Pokémon is affected by Smack Down or Ingrain, the opponent has the Ability Mold Breaker, or this Pokémon's Ability is affected by Gastro Acid or is replaced, the effectiveness of Ground-type moves is 2×.
(From Bulbapedia)Gastly seems to be based on general cartoonish ghosts and spirits, or maybe a will-o'-the-wisp. It may also have been based on the Japanese yōkai sōgen bi, the decapitated head of a monk whose head is doomed to wander the Earth, consumed by fire. Its Poison type is most likely a reference to poisonous or polluted gases.
(From Bulbapedia) Gastly may be a combination of gas and ghastly (like a ghost; dreadfully frightening).