It's funny you mention this because I'm just getting past a similar situation with my kitty. Last week she apparently got some grass caught in her throat, near her trachea, and would gag terribly after eating or drinking. She ended up at the hospital three times that day and they were able to remove what we thought was all of it. However, over the following few days, her coughing/gagging fits after eating became more frequent. I was just about to take her back in when she had a really bad gagging episode. I gave her a treat right after that and she hasn't coughed or gagged since. I believe that last time she finally got up what was left caught in her throat and the treat helped get it to pass.
I know this is probably a very different situation than yours, but it's possibly your kitty also has something stuck (e.g. hairball) or could even have an esophogeal abnormality that's causing this. My kitty has always had this problem after drinking (coughing fit for a few seconds and then is fine), so I truly believe she has some minor abnormality as well. This probably exacerbated the issue with the grass getting stuck. Anyways, I wouldn't worry about it too much as long as your cat is eating/drinking okay and his behavior stays the same. But it's definitely something you should talk about with your vet. Best of luck!