What you are talking about is the uvula, a muscular tissue that hangs down at the back of the throat. The uvula is mainly used to control the way we swallow food, and prevents food from going down our throats the wrong way. Along with the soft palate, the uvula is also responsible for the gag reflex - touching it causes contractions in the throat, and eventually vomiting.
Usually the uvula is entirely unnoticed and rarely causes any trouble at all. Occasionally however it can get infected or otherwise inflamed, which can be painful and also uncomfortable. Most of the time, an infection of the uvula occurs along with a throat infection or tonsillitis, but in rare cases, only the uvula may get infected. The infection is usually temporary, and disappears on its own within a few days. However, you can speed up the healing by gargling with warm salt water several times a day. This is particularly useful if the inflammation is causing you to gag, as it is in your case. You should also ensure that you drink enough water, as dehydration can cause the uvula to swell. Tobacco smoke also irritates the uvula, particularly if it is already infected, so you should avoid smoking or hanging around other people when they smoke.
answered by M W