If "grate" isn't a word, why is there a word "grateful" (and "gratitude")?
It has nothing to do with modern "grates" but everything to do with gratitude, since it's the state of feeling gratitude towards someone or something. Grateful and gratitude, though, actually come from an archaic adjective "grate" meaning thankful, which derives from the Latin "gratus" (not to be confused with "gratis"), meaning pleasing, agreeable, thankful, etc. It's loosely related to "grace".
The root word is apparently even older than Latin: http://en.wiktionary.org/wiki/gratus