I understand that the phrase "Mother of God" appears in the prayer commonly referred to as the "Hail Mary" prayer. I'm wondering, though, what the origin is of the phrase "Mother of God". Did it first appear in the Hail Mary prayer or does it predate that?
Although Mary is the Mother of God, she is not his mother in the sense that she is older than God or the source of her Son’s divinity, for she is neither. Rather, she is the Mother of God in the sense that she carried in her womb a divine person—Jesus Christ, God "in the flesh".
If this is not so then it is like saying that Mary did not carry God in her womb, but only carried Christ’s human nature. This assertion will be same as heresy of Nestorianism. On the contrary Mary carried and gave birth to the person of Jesus Christ, and the person she gave birth to was God.
Here are some of the summarized forms of Mother of God references from very early age of Christianity:
Irenaeus: [A.D. 189] "The Virgin Mary, being obedient to his word, received from an angel the glad tidings that she would bear God" (Against Heresies, 5:19:1).
Hippolytus [A.D. 217] ….Thus, too, they preached of the advent of God in the flesh to the world, his advent by the spotless and God-bearing (theotokos) Mary in the way of birth and growth, and the manner of his life and conversation with men, and his manifestation by baptism, and the new birth that was to be to all men, and the regeneration by the laver [of baptism]" (Discourse on the End of the World 1).
Gregory the Wonderworker [A.D. 262] "For Luke, in the inspired Gospel narratives, delivers a testimony not to Joseph only, but also to Mary, the Mother of God, and gives this account with reference to the very family and house of David" (Four Homilies 1).
"It is our duty to present to God, like sacrifices, all the festivals and hymnal celebrations; and first of all, [the feast of] the Annunciation to the holy Mother of God, to wit, the salutation made to her by the angel, ‘Hail, full of grace!’" (ibid., 2).
Peter of Alexandria: [A.D. 305] "They came to the church of the most blessed Mother of God, and ever-virgin Mary, which, as we began to say, he had constructed in the western quarter, in a suburb, for a cemetery of the martyrs" (The Genuine Acts of Peter of Alexandria).
"We acknowledge the resurrection of the dead, of which Jesus Christ our Lord became the firstling; he bore a body not in appearance but in truth derived from Mary the Mother of God" (Letter to All Non-Egyptian Bishops 12 [A.D. 324]).
As the length of this answer is increasing, I will restrict here in mentioning only the names and dates when these references were made:
Methodius: (Oration on Simeon and Anna 7 [A.D. 305]); Cyril of Jerusalem:(Catechetical Lectures 10:19 [A.D. 350]);Ephraim the Syrian:(Songs of Praise 1:20 [A.D. 351]); Athanasius: (The Incarnation of the Word of God 8 [A.D. 365]); Epiphanius of Salamis:(The Man Well-Anchored 75 [A.D. 374]); Ambrose of Milan:(The Virgins 2:2 [A.D. 377]) and many more.
The other fellas addressed this pretty well, but I figured, what the heck, might as well muddy the waters with some extra stuff from the "Short Catechism of Mary"
70) When was the "Hail Mary" introduced into the Liturgy?
The first part, which is in the Gospel, appeared in an Entrance Antiphon of the Mass around the 6th century. It began to spread among the faithful beginning with the 13th century.
The second part ("Holy Mary..."), whose elements preexisted in a separated state, was put together beginning with 1400 and became current among the faithful a little after 1500.
However, in "The Secret of the Rosary" St. Louis De Montfort says
it was in the year 1214, however, that Holy Mother Church received the Rosary in its present form and according to the method we use today.
So, there seems to be some confusion as to the dates. But no confusion as to the meaning of Mother of God in the context of the Rosary. And whatever words St. Dominic uttered, I highly doubt they failed to contain a plea to the Holy Mother of God.
St. Louis continues in his explanation of the Hail Mary:
Holy in body and soul
Holy because of thy incomparable
And eternal devotion
To the service of God—
Holy in thy great rank
Of Mother of God
Who has endowed thee
With eminent holiness
A worthy attribute
Of this great dignity.
Mother of God
And our Mother—
Our Advocate and Mediatrix
Thou art the Treasurer of God's graces
And who dost dispense them
As thou seest fit—
And those are all the things that the title Mother of God entails. All of which had been gleaned through Tradition and Scripture since the beginning of the Church.
She's the channel of graces (Mediatrix), because it is through her the Christ comes into the world, all the Gospels attest to this.
John, who was intimately acquainted with her story, knows that Jesus gave her to us all from the cross
Then he said to the disciple, “Behold, your mother.” And from that hour the disciple took her into his home. (John 19:27 NABRE)
He also recounts a story of Mary's intercession
When the wine ran short, the mother of Jesus said to him, “They have no wine.” (John 2:3)
which makes her the advocate that St. Louis talks about.
Now, you might think, "I know this guy, he's just a crazy Catholic Mariolotrist who would say anything to arrive at the point that any thing good you can say about Mary makes her Divine Son happy."
But the point is, you're asking for a precise date when a particular dogma was infallibly proclaimed and I'd say it was 451 in the Council of Chalcedon which produced the following creed:
...for us and for our salvation, born of the Virgin Mary, the Mother of God, according to the Manhood; one and the same Christ, Son, Lord, only begotten, to be acknowledged in two natures, inconfusedly, unchangeably, indivisibly, inseparably;...
but it's really, the unchanging Tradition of the Catholic Church that Mary is the Mother of God and it was known by her little people long before it was written in stone by her big people.
Wikipedia's entry on theotokos ("mother of God") already answers this pretty well:
Use in the early Christian Church
Origen (d. 254) is often cited as the earliest author to use theotokos for Mary (Socrates, Ecclesiastical History 7.32 citing Origen's Commentary on Romans) but the text upon which this assertion is based may not be genuine.
Athanasius of Alexandria in 330, Gregory the Theologian in 370, John Chrysostom in 400, and Augustine all used theotokos.
Sub tuum praesidium, a Coptic Orthodox hymn dating approximately to the year 250, refers to Mary as the theotokos.
The Hail Mary Prayer, though based in Luke, by contrast, dates to the 1050s:-
After considering the use of similar words in Syriac, Greek and Latin in the 6th century, the article on the Hail Mary in the Catholic Encyclopedia concludes that "there is little or no trace of the Hail Mary as an accepted devotional formula before about 1050," though a later pious tale attributed to Ildephonsus of Toledo (fl. 7th century) the use of the first part, namely the angel's greeting Mary, without that of Elizabeth, as a prayer.
This pray came from the Apostles: Most Holy Theotokos, help us!
They have spoken first time this pray after Assumption, when they saw that her body was resurrected after three days and taken in the skys by her Son and God. This is celebrated at 15 August in Eastern Orthodox Church.
You can find this in "Great Synaxarites of the Orthodox Church"