When was the title of "Mother of God" first ascribed to Mary? 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.   

Precisely for this reason, both Martin Luther and John Calvin  insisted on Mary’s divine maternity.    

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[7] [A.D. 377]) and many more.