It’s redundant to spend too much time overthinking that riddle, as that’s already been done. Even redundantly so:
Merriam-Webster overthinks it here.
Snopes overthinks it here, including listing a dozen other -gry words in the English language! (The gotcha: They are not common words. Munroe’s statement of the problem doesn’t specify that the answer must be a common well-known word, but other variants of the riddle do.) All the words are either obscure or archaic or both, or variant spellings, or oddball imported foreign words.
ETA: My sympathies, of course, are with Black Hat Man there. I daresay we all agry on that.