Is there actually a "g" sound at the end of "biadh" or am I imagining it?
Yes, there is. The letter pair “dh” sounds like /g/ before or after the ‘broad’ vowels a, o, and u. It sounds like /y/ before e and i, and is silent following i.
Why is "The" food is good not accepted? Is there a different word for "The?"
Yes, biadh is food, am biadh is the food.
'Tha am biadh math' > 'The food is good'