Heb. harak, meaning "to grate the teeth", (Job 16:9; Psalms 112:10; Lamentations 2:16), denotes rage or sorrow. (See also Acts 7:54; Mark 9:18.)
These dictionary topics are from M.G. Easton M.A., D.D., Illustrated Bible Dictionary, Third Edition, published by Thomas Nelson, 1897. Public Domain, copy freely.
Easton, Matthew George. "Entry for 'Gnash'". "Easton's Bible Dictionary".