The history of Valentine's Day is obscure and is associated with various legends. The roots of Valentine’s Day are in an ancient Roman fertility celebration. Pope Gelasius turned this pagan festival into a Christian feast day around 496, declaring February 14 to be St. Valentine's Day, to honor one of the three early Christian saints whose names were "St. Valentine”.
One legend has it that Valentine, who was in prison, fell in love with the daughter of his jailer. Before he was executed, he allegedly sent her a letter signed "from your Valentine." The most likely story surrounding St. Valentine is one focused on Christian love rather than passionate love: he was apparently martyred on February 14th for refusing to renounce his religion.
In the 14th century this Christian feast day became definitively associated with love. It was the poet, Chaucer, who first linked St. Valentine's Day with romance.
By the 18th century, gift giving and exchanging handmade cards on Valentine's Day had become common in England, a custom that eventually spread to the American colonies. By the 1850s, the tradition of giving gifts, typically chocolates or jewelry, became widespread in the United States.
***NOTE: For more detailed information, please see the comment below by Marie. There are apparently many different stories related to Valentine's Day and the saint the holiday it is named for. I appreciate Marie taking the time to write and I have adjusted my errors in language above. I took my information from a variety of online sources and it is a quick synopsis of what I found after researching the holiday.