Taken from AmericanCatholic.org
The Catholic Church no longer officially honors St. Valentine, but the holiday has both Roman and Catholic roots.
The Origins of St. Valentines Day
Although the mid-February holiday celebrating love and lovers remains wildly popular, the confusion over its origins led the Catholic Church, in 1969, to drop St. Valentine's Day from the Roman calendar of official, worldwide Catholic feasts. (Those highly sought-after days are reserved for saints with more clear historical record. After all, the saints are real individuals for us to imitate.) Some parishes, however, observe the feast of St. Valentine.
The roots of St. Valentine's Day lie in the ancient Roman festival of Lupercalia, which was celebrated on Feb. 15. For 800 years the Romans had dedicated this day to the god Lupercus. On Lupercalia, a young man would draw the name of a young woman in a lottery and would then keep the woman as a sexual companion for the year.
Pope Gelasius I was, understandably, less than thrilled with this custom. So he changed the lottery to have both young men and women draw the names of saints whom they would then emulate for the year (a change that no doubt disappointed a few young men). Instead of Lupercus, the patron of the feast became Valentine. For Roman men, the day continued to be an occasion to seek the affections of women, and it became a tradition to give out handwritten messages of admiration that included Valentine's name.
There was also a conventional belief in Europe during the Middle Ages that birds chose their partners in the middle of February. Thus the day was dedicated to love, and people observed it by writing love letters and sending small gifts to their beloved. Legend has it that Charles, duke of Orleans, sent the first real Valentine card to his wife in 1415, when he was imprisoned in the Tower of London. (He, however, was not beheaded, and died a half-century later of old age.)