An old wish
The Romans already had a formula for greeting a sneeze. They said "May Jupiter preserve you", and considered that this sneeze marked the passage of a god and his exit from the soul. It was customary to entrust this divine spirit with a wish to be granted. It stuck.
In the Middle Ages, the Roman formula was replaced by "God bless you". During the Great Plague, the "à vos souhaits" came back into vogue because it was thought that the plague could enter the body through the mouth, and saying "à vos souhaits" meant wishing to block the disease.
Eon and Tellus, two Latin gods. Illustration chosen by monsieurdefrance.com; bibi Saint-Pol via wikipedia.
What next?
Some will add "à tes amours " to the second sneeze, and it's sometimes customary to say "que les tiennes durent toujours" to the 3rd sneeze.
Bless you may not be polite
Some say that "bless you" isn't necessarily polite in the sense that, since it's often embarrassing to sneeze in people's presence, it wouldn't be good manners to point it out. In fact, it's better to pretend it never happened... It's up to you!