From a Care2 newsletter:
The origins of Valentine’s Day trace back to the ancient Roman celebration of Lupercalia. Held on February 15, Lupercalia honored the gods Lupercus and Faunus, as well as the legendary founders of Rome, Romulus, and Remus.
In addition to a bountiful feast, Lupercalia festivities are purported to have included the pairing of young women and men. Men would draw women’s names from a box, and each couple would be paired until next year’s celebration.
While this pairing of couples set the tone for today’s holiday, it wasn’t called “Valentine’s Day” until a priest named Valentine came along. Valentine, a romantic at heart, disobeyed Emperor Claudius II’s decree that soldiers remain bachelors. Valentine defied the emperor and secretly performed marriage ceremonies. As a result of his defiance, Valentine was put to death on February 14.
After Valentine’s death, he was named a saint. As Christianity spread through Rome, the priests moved Lupercalia from February 15 to February 14 and renamed it St. Valentine’s Day to honor Saint Valentine.