This might be a way to beat a gag reflex!
I was able to beat the gag reflex the last time I was at the dentist. I did it by basically shutting down while they worked on me; I completely relaxed. I think that some people who have a gag reflex might be people who just use more oxygen overall than the average. I had to almost nap in a way; I closed my eyes and had earphones over me while they worked. I didn’t gag once when they stuck the measuring film in my mouth; I was completely motionless. The best way for me to relax is to ‘ground’ my thoughts, or at least that’s the best way to describe it. This may not work for everyone, but I focused my thoughts on something completely unrelated to dental health or dentistry, like science for me. It’s weird, but it worked! (I have a more scientist type of personality so this might work better in my case. I’d try it if you have a gag reflex!)