Here's why:
* Winds are driven by differences in air pressure. These pressure differences are caused by uneven heating of the Earth's surface. Warm air rises, creating areas of low pressure, while cool air sinks, creating areas of high pressure. Air flows from high pressure to low pressure, creating wind.
* Gravity acts on air like it does on everything else. Gravity pulls air downwards, but it doesn't prevent wind from blowing.
* Wind can flow upwards. Think of updrafts in thunderstorms, where warm air rises, defying gravity due to its buoyancy. Also, winds in mountainous regions can be forced upwards by terrain.
Essentially, gravity affects the overall density of the atmosphere and how air moves, but it doesn't stop wind from blowing.