Sorry if this has been reported before.
Below is a quote from the Smogon page for the move Gravity:
All immunities to Ground-type moves, Spikes, Toxic Spikes, and Arena Trap are removed. Pokemon who previously had a Flying-type take neutral damage from Ground-type attacks, but Pokemon with Levitate act as though they have no ability.
Pokemon that possess the Levitate ability
and Pokemon that possess a Flying type
(whether it be mono or part) can switch out from Arena Trap while the field is under the effect of Gravity.
Note: Pokemon with a Flying-type or/and Levitate can hit be Earthquake (and other ground-type moves) while under the effect of Gravity.