Old English greot "sand, dust, earth, gravel," from Proto-Germanic *greutan "tiny particles of crushed rock" (source also of Old Saxon griot, Old Frisian gret, Old Norse grjot "rock, stone," German Grieß "grit, sand"), from PIE *ghreu- "rub, grind" (source also of Lithuanian grūdas "corn, kernel," Old Church Slavonic gruda "clod"). Sense of "pluck, spirit, firmness of mind" first recorded American English, 1808.
If he hadn't a had the clear grit in him, and showed teeth and claws, they'd a nullified him so, you wouldn't have see'd a grease spot of him no more. [Thomas Chandler Haliburton, "Sam Slick in England," 1843]
"make a grating sound," 1762, probably from grit (n.). Meaning "to grate, grind" is from 1797. Related: Gritted; gritting.