To "bite the bullet" means to accept that something unpleasant or difficult is sure to happen. It is often used when someone has tried easier or simpler alternatives for a task, but those methods have not been successful; however, trying other alternatives before going to the harder way is not required.
An easy way to remember this definition is to imagine a soldier biting a bullet while having emergency surgery on the battlefield with no medicine for pain. (This is often considered the origin of the phrase, but there is little evidence to support that claim.)
On the other hand, to "grit one's teeth" means to prepare for a challenge or strengthen one's will. This is a more general term, which can be used for a person dealing with any challenge, not necessarily an unavoidable one.
Anyone who is "biting the bullet" will probably "grit their teeth," but just because someone is "gritting their teeth" it doesn't necessarily mean they've "bitten a bullet."
EDIT to add requested examples:
Bob's car broke down on a highway in the middle of the desert. He tried to fix it himself but didn't know how. He tried flagging down someone passing by for a ride or to borrow a phone but nobody stopped. After a couple hours, Bob decided to bite the bullet and walk the 25 miles back to the last service station he passed.
Alice really wanted to make her school's football team. She was already tired from a day at the gym but she gritted her teeth and told herself to do one more set of push-ups so she could beat the competition.
One idiom in the same vain as your two expressions that I can think of at the moment would be the joke is on somebody:
If you say that the joke is on a particular person, you mean that that person has tried to make someone else look silly but has made himself or herself look silly instead.
Moreover, it's also a common expression. What I mean by that is that it's not only found in dictionaries. You will actually hear somebody use it at some point if you listen to native English speakers speak long enough.
Best Answer
You probably have not provided enough of an extract for readers to understand the context of the phrase. However, such a phrase is usually used to indicate that something is a very bright colour or an extreme pattern that offends the eye. The phrase "burning eyes" refers to something as bright as the sun.
It is implying the shorts are so ugly that the writer had to look away to protect their eyes.