I believe you are hearing a reverse sneeze. If you gently rub the throat, it should subside.
Please try this and let me know if it helps. It sounds like choking and is very scary.
A reverse sneeze takes place when a dog gets an irritaiton, (possible from allergies) and starts to inhale through the nose to make a gagging type sound. This is actually a 'pharyngeal gag reflex'. It is called a reverse sneeze, because it sounds like the dog is pulling air in through its nose, rather than sneezing the air outward.
It is scary,but harmless. It will usually subside if the though is gently rubbed during the episode. I am giving you a site to read about the Reverse Sneeze. You may also want to have your dog checked for a Collapsing trachea which can also sound very similiar. You can read about Collapsing Trechea here: http://www.stowcreekdesigns.com/CollapsingTrachea.html Joan