An Etymological Dictionary of the German Language/Annotated/Griesgram

Griesgram, masculine, ‘ill-humour, spleen,’ from Middle High German grisgram, masculine, ‘gnashing of teeth’; allied to Middle High German grisgramen, -grammen, ‘to gnash with the teeth, snarl,’ Old High German grisgramôn, gristgrimmôn, ‘to gnash,’ Anglo-Saxon gristbîtung, ‘gnashing of teeth.’ The first syllable represents grist-, but that does not make the early history of the word clearer.