This issue is due to lacking information on the part of the UI. Just open up the city details screen, and on the third column hover over food - it will tell you how much food your city produces in total, how much food is taken up by current population and what's left for expansion.
When out of food, you can research civics technologies that provide extra food per grain, build some buildings to the same effect, capture via outposts any food-producing terrain bonus (sends the food to the closest city), or rely on late-game spells.