The expression "Bite the Bullet" first appeared in 1891's 'The Light that Failed', a book by Rudyard Kipling. It is believed its roots come from a time when people would literally bite a bullet during medical surgeries and procedures. Back then, there was no such thing as anesthetic, so the pain was so extreme patients needed to take it out on something. 
The meaning of the expression is similar nowadays, though not quite the same. It means to accept the hardship or pain in a situation one is about to endure. It is a common expression used in both everyday life and in the movies.