The Twelve Days of Christmas is probably the most misunderstood part of the church year among Christians who are not part of liturgical church traditions. Contrary to much popular belief, these are not the twelve days before Christmas, but in most of the Western Church are the twelve days from Christmas until the beginning of Epiphany (January 6th; the 12 days count from December 25th until January 5th). In some traditions, the first day of Christmas begins on the evening of December 25th but the following day is considered the First Day of Christmas (December 26th).
The origin of the Twelve Days is complicated, and is related to differences in calendars, church traditions, and ways to observe this holy day in various cultures (see Christmas). In the Western church, Epiphany is traditionally celebrated as the time the three Wise Men or Magi arrived to present gifts to the young Jesus (Matt. 2:1-12). In some cultures, especially Hispanic and Latin American culture, January 6th is observed as Three Kings Day, or simply the Day of the Kings (Span: la Fiesta de Reyes, el Dia de los Tres Reyes, or el Dia de los Reyes Magos; Dutch: Driekoningendag). Even though December 25th is celebrated as Christmas in these cultures, January 6th is often the day for giving gifts. In some places it is traditional to give Christmas gifts for each of the Twelve Days of Christmas. Since Eastern Orthodox traditions use a different religious calendar, they celebrate Christmas on January 7th and observe Epiphany or Theophany on January 19th.
By the 16th century, some European and Scandinavian cultures had combined the Twelve Days of Christmas with (sometimes pagan) festivals celebrating the changing of the year. These were usually associated with driving away evil spirits for the start of the new year.
The Twelfth Night is January 5th, the last day of the Christmas Season before Epiphany (January 6th). In some church traditions, January 5th is considered the eleventh Day of Christmas, while the evening of January 5th is still counted as the Twelfth Night, the beginning of the Twelfth day of Christmas the following day. Twelfth Night often included feasting along with the removal of Christmas decorations. French and English celebrations of Twelfth Night included a King's Cake, remembering the visit of the Three Magi, and ale or wine (a King's Cake is part of the observance of Mardi Gras in French Catholic culture of the Southern USA). In some cultures, the King's Cake was part of the celebration of the day of Epiphany.