Definition: Gagging means sudden and consequent of contraction of pharyngeal muscles which lead to special sound and movement of pharynx but different from coughing.
1- Brachycephalic breeds like Pug dogs or Persian cats because of anatomy of pharynx.
2- Obstruction of esophagus with a large mass or piece of food
3-Entering of a foreign body or a particle of food to trachea ( Gagging with coughing)
4-Any lesion or inflammation of pharyngeal area
6- After surgical procedure because of tracheal tube ( gagging with coughing )
On the basis of physical examination your vet chooses one or all of these procedure:
blood test, radiography, ultrasound and endoscopy
On the basis of diagnosis medical or surgical treatment can be used by your vet.