By the description you gave this sounds like it could be reverse sneezing. Click on this link to see videos of other dogs reverse sneezing to see if you think this could be what is going on.
If this looks like what your dog is doing, it is no usually much to worry about. It can be associated with any irritation of the pharynx. Often allergies play a role. Benadryl is often recommended at 1mg per pound of body weight.
If what your dog is doing doesn't look like reverse sneezing or if you have additional questions just reply.
__________If this was helpful, please click ACCEPT___________________
Another possibility that doesn't happen much in smaller dogs is canine bloat. The symptoms for this are retching and trying to vomit with nothing coming up. Their stomach will appear distended. They may drool, breathe rapidly, and appear to be in pain. Although this is not common in smaller breeds it can happen and if you think this may be what is going on with your dog you need to get him to the vet immediately as it can be very serious. Here is a link to more information.
If these symptoms don't fit what you are seeing, just reply and we will get back to you with other possibilities.
_________If this was helpful please click ACCEPT________________