my ger does that when the food i give her is too thick or sticky for her to swallow.
what i do is to wait for her to stop gagging, and then give her a little water to wash the food down. I will also add more water to the puree or food.
Maybe you can make the cereal more watery like milk? When first starting with cereals, it's good to make it watery like milk, before thickening it once baby gets used to eating semi-solids.