A natural reflex that keeps us from sticking foreign objects down our throats. The sensation is similar to choking. You may experience retching or even vomiting if gagging is prolonged. Happens quite often at the dentist.
I couldn't stop gagging when the doctor stuck a tongue depressor in my mouth.