The Twelve Days of Christmas are the days from Christmas until the beginning of Epiphany (January 6th; the 12 days count from December 25th until January 6th). On the updated calendar — since Ephiphany is celebrated on a Sunday — these days may be more or less. We have 17 days on the tree this year because the Christmas season extends until the feast of the Baptism of Christ and we have decided to include them all.
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. 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. In some cultures Epiphany is observed as Three Kings Day, or simply the Day of the Kings. Even though December 25th is celebrated as Christmas in these cultures, Epiphany 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.