To gnash is to rub or grind your teeth together. A suspicious guard dog might growl and gnash its teeth.
When you angrily grit your teeth, you can say you gnash them. People almost always gnash their teeth from anger or frustration, or in a display of ferocity. A terrible ogre in a fairy tale might gnash his teeth, and your furious school bus driver might gnash her teeth at the ruckus her passengers are making. Gnash is a Middle English variation on gnasten, "grind the teeth together," from Old Norse gnasta, "gnash the teeth."