Withstand a necessary duty. Prepare for the pain of a troublesome event. The phrase suggests that an unwelcome, mandated decision must be made or a necessary chore completed. In old cowboy movies when a bullet or arrow was being extracted from someone in the film, they were told to grit their teeth so as not to scream in pain. (Compare to Fed-up, Ticked off or On edge.) {See 50 Levels of Anger}
“I don’t know how to tell her I don’t want to date her anymore, so I guess I’ll just grit my teeth and tell her.”