In the Church, the day technically begins at sunset. Therefore, Christmas begins at sundown on December 24th, which we very appropriately call "Christmas Eve." The Christmas Season, which begins with Christmas Eve, ends on the eve of Epiphany, which is sundown on January 5th. Therefore, Christmas lasts twelve days, and the period from sundown on December 24th to sundown on January 5th is called the "Twelve Days of Christmas."

There is a common misconception that the “Twelve Days of Christmas” was written as one of the “catechism songs” to help young Catholics learn the tenets of their faith. During the period of 1558 to 1829 in England, Catholics were prohibited from any practice of their faith by law – private or public. To be caught with anything in "writing" indicating adherence to the Catholic faith could not only get you imprisoned but could also get you hanged, thus making it only safe to communicate through song. The alleged breakdown goes as thus:

"True Love" refers to God.
"Me" refers to every baptized person.
The other symbols mean the following:
1 Partridge in a Pear Tree = Jesus Christ
2 Turtle Doves = The Old and New Testaments
3 French Hens = Faith, Hope and Charity or the Father, Son and Holy Spirit Trinity
4 Calling Birds = The Four Gospels and/or the Four Evangelists
5 Golden Rings = The first Five Books of the Old Testament or The Catholic Church's five obligatory sacraments: baptism, communion, confirmation, penance and last rites
6 Geese-A-laying = The six days of creation
7 Swans-A-swimming = The seven gifts of the Holy Spirit, the seven sacraments
8 Maids-A-milking = The eight beatitudes or the eight times a year that Roman Catholics in those days were required to receive Holy Communion
9 Ladies Dancing = The nine Fruits of the Holy Spirit
10 Lords-A-leaping = The Ten Commandments
11 Pipers Piping = The eleven apostles, excluding Judas
12 Drummers Drumming = The twelve points of doctrine in the Apostle's Creed

It is also possible that "The Twelve Days of Christmas" has been confused with (or is a transformation of) a song called "A New Dial" (also known as "In Those Twelve Days"), which dates to at least 1625 and assigns religious meanings to each of the twelve days of Christmas (but not for the purposes of teaching a catechism). In a manner somewhat similar to the memory-and-forfeits performance of "The Twelve Days of Christmas," the song "A New Dial" was recited in a question-and-answer format:

What are they that are but one?
We have one God alone
In heaven above sits on His throne.

What are they which are by two?
Two testaments, the old and new,
We do acknowledge to be true.

What are they which are but three?
Three persons in the Trinity
Which make one God in unity.

What are they which are but four
Four sweet Evangelists there are,
Christ's birth, life, death which do declare.

What are they which are but five?
Five senses, like five kings, maintain
In every man a several reign.

What are they which are but six?
Six days to labor is not wrong,
For God himself did work so long

What are they which are but seven?
Seven liberal arts hath God sent down
With divine skill man's soul to crown.

What are they which are but eight?
Eight Beatitudes are there given
Use them right and go to heaven.

What are they which are but nine?
Nine Muses, like the heaven's nine spheres,
With sacred tunes entice our ears.

What are they which are but ten?
Ten statutes God to Moses gave
Which, kept or broke, do spill or save.

What are they which are but eleven?
Eleven thousand virgins did partake
And suffered death for Jesus' sake.

What are they which are but twelve?
Twelve are attending on God's son;
Twelve make our creed. The Dial's done.

All that we can be sure of is this - The Twelve Days of Christmas" is what most people take it to be: a secular song that celebrates the Christmas season with imagery of gifts and dancing and music.

much thanks to and other assorted sources from

(I still can’t remember every gift – but at least I know why they are there…)