From 1558 until 1829 Roman Catholics in England were not allowed to practice their faith openly. During that era someone wrote 'The Twelve Days of Christmas' as a kind of secret catechism that could be sung in public without the risk of persecution.
'The 12 Days of Christmas' is, in essence, an allegory. The song has two levels of interpretation: the surface meaning plus a hidden meaning known only to members of the church.
Each element in the carol is a code word for a religious reality. The 'true love' represents God and the 'me' who receives these presents is the Christian (a Catholic in this case).
The hidden meanings are:
The partridge in a pear tree is Jesus Christ a tree as a gift from God.
The two turtledoves are the Old and New Testaments, another gift from God.
Three French hens stand for faith, hope and love - the three gifts of the Spirit that abide (I Corinthians 13).
The four calling birds are the four Gospels, which sing the song of salvation through Jesus Christ.
The five gold rings recall the Torah (Law) the first five books of the Old Testament, also called the 'Books of Moses.'
The six geese a-laying stand for the six days of creation.
Seven swans a-swimming represent the sevenfold gifts of the Spirit (I Corinthians 12:8-11, Romans 12, Ephesians 4, 1 Peter 4:10-11).
The eight maids a-milking are the eight beatitudes.
Nine ladies dancing? These are the nine fruits of the Spirit (Galatians 5:22-23).
The ten lords a-leaping are the Ten Commandments.
Eleven pipers piping stand for the eleven faithful disciples. (Excludes Judas.)
Twelve drummers drumming symbolize the 12 points of belief in the Apostles' Creed.
So the next time you hear 'The 12 Days of Christmas,' consider how this otherwise non-religious-sounding song had its origins in the Christian faith.