In most cases your dragons will generate enough gold to pay for their own Food, but when trying to level a dragon up to a high level you may find that the growing process is not producing enough food fast enough for your plans. In such cases you can use gems to speed up production or to buy food from the game.
Here is a handy tip for those of you that are under the lvl 18. If you have 11 min to spare than just keep producing dragon bells. After some math you can make 100 in 10 mins(a 30 min value!), this is for 1 food farm (multiply the food produced by two for every food farm).