Hi, A.. I'm not sure what you mean by gagging. Do you mean that he seems to be choking while nothing is in his mouth? Or that he seems to be choking while feeding? Or is he just making weird sounds?
Newborns do have to get used to swallowing; it's a new thing for them, balancing breathing and swallowing, and they sometimes get it a little wrong. I would only worry if he keeps doing it a lot.
Try changing the position you're feeding him in. Keep his head up so that the milk flows downward into his throat. Don't feed him flat on his back where he has to swallow hard to push the milk downwards. And don't feeed him any cereal or other solids -- he can DEFINITELY gag or choke on that.
He may just have a lot of saliva, spit, which babies have a lot of anyway. If he's gagging in his sleep, try having him sleep with his head raised a little bit higher than his feet. You can do this by putting a folded up towel under his head and back or head and chest while he's sleeping. This will cause the saliva to go down his throat and not build up in his mouth.
If he gags more, or it doesn't start becoming less and less, talk to the doctor again because it could be something else.
Peace,
Syl