The twelve days of Christmas are the twelve days between Christmas and Epiphany (January 6th), which is when the three wise men arrived on the scene. The tradition of giving a gift on each of the twelve days is not as popular as it once was. However, in some families, the tradition of giving Christmas gifts on each of those twelve days still persists. Most people know of The Twelve Days of Christmas from the song of that name.
Below is a popular urban myth about "The Twelve Days of Christmas" that first came to the net in 1995 via an article from Catholic Information Network (by Fr. Hal Stockert of Fishnetsite) that later withdrew its page. However, the myth has spread through the net, though the original source as long withdrawn its claim to the story. However, according to A Celebration and History(ISBN 0-679-74038-4), by Leigh Grant, the written lyrics to "The Twelve Days of Christmas" first appeared in Mirth without Mischief in the early 1780s in England. Grant states that the tune to which these words are sung apparently dates back much further and came from France. Mirth without Mischief describes "The Twelve Days of Christmas" as a type of memory game played by children at that time. A leader recited the first verse, the next child recited the second verse, and so on until someone missed a verse and had to pay some kind of penalty in the game. There was no religious significance. But the myth makes a good story.