Yes, and Haunter answered it perfectly.
Spikes are 'entry hazards', and therefore only cause damage when a Pokemon enters the battle. If a Flying-type Pokemon enters the battle when Gravity is in play, then it will take damage from the Spikes. However, if a Flying-type Pokemon is already on the field and then Gravity is set up, it will not take damage from Spikes due to being 'pulled down'.
Spikes are 'entry hazards', and therefore only cause damage when a Pokemon enters the battle. If a Flying-type Pokemon enters the battle when Gravity is in play, then it will take damage from the Spikes. However, if a Flying-type Pokemon is already on the field and then Gravity is set up, it will not take damage from Spikes due to being 'pulled down'.