It cannot be said that they are in opposite directions. They have different meanings, yes, but they don't have opposite meanings at all !
**************************************************************************************
GRATE
1. a frame of metal bars for holding fuel when burning, as in a fireplace, furnace, or stove.
2. a framework of parallel or crossed bars, used as a partition, guard, cover, or the like; grating.
3. a fireplace.
Origin:
1350–1400; Middle English < Medieval Latin : grāta : a grating, variant of crāta : wickerwork, hurdle
**************************************************************************************
GRATEFUL
1. warmly or deeply appreciative of kindness or benefits received; thankful: I am grateful to you for your help.
2. expressing or actuated by gratitude: a grateful letter.
3. pleasing to the mind or senses; agreeable or welcome; refreshing: a grateful breeze.
1545–55; (obsolete) grate : pleasing (< Latin grātus ) + -ful
**************************************************************************************
So, as you see, Grate has come from Medieval Latin "grāta " whereas Grateful from the Latin word grātus.
they, therefore, have different roots !