Hello~I hope that by now the issue has cleared up.
Sometimes this type of coughing can be due to allergies or a minor infection starting in your throat, if you haven't seen your GP yet and are still having issues like this, I highly recommend seeing him as soon as possible.
Hello and welcome to MedHelp's forums. Have you been ill or do you have any cold symptoms? Here is a handy symptom tracker to check to see where your symptoms fall https://symptomchecker.webmd.com/multiple-symptoms?symptoms=cough%7Cgagging%7Cnausea-or-vomiting%7Csore-throat&symptomids=59%7C590%7C156%7C219&locations=10%7C10%7C20%7C10.
You may wish to consult with your doctor who can look to see if you have an infection of the tonsils or something of this nature contributing to the feeling you get in the back of your throat. When coughing, gagging and eventually throwing up is not that uncommon but very annoying. We are sorry you are suffering this predicament.