Question: is gnashing of teeth an idiom?
Answer: feel very angry and upset about something, especially because you cannot get what you want: He'll be gnashing his teeth when he hears that we lost the contract. The basic meaning of gnash your teeth is to bite or grind them together.