Grind one’s teeth
In the literal sense, to produce a grating sound with the teeth dates from the early 15th century, whereas the figurative sense of showing determination of purpose dates from the late 18th century. See also Grit one’s teeth.