What is the biblical basis for the belief that Mary is the mother of God? Catholics often refer to Mary, the mother of the Lord Jesus Christ, as “the mother of God.”1 What is the biblical basis for this belief?

1 CCC, §963
Short answer

There is no usage of the title "Mother of God" in the Bible. The title was used for Mary as early as AD 250-280 and was made official church teaching at the Council of Ephesus in 431. Advocates wanted to use that title, as opposed to the alternative "Mother of Christ", to affirm the doctrine of Incarnation (that Jesus Christ is the second person in the Trinity), which has its own biblical basis (e.g. John 1). In other words, the title "Mother of God" is less about Mary and more about Jesus' divinity.

Long answer

Let's start by working backwards from the Catechism of the Catholic Church (which does a decent job of sourcing its theology). All bolded text is my own emphasis.

A few sections after the one you mentioned is an explanation of the devotion of to Mary. CCC §971 explains why she is considered blessed, and why she is given the title "Mother of God" 


  CCC §971 "All generations will call me blessed": "The Church's devotion to the Blessed Virgin is intrinsic to Christian worship."515 The Church rightly honors "the Blessed Virgin with special devotion. From the most ancient times the Blessed Virgin has been honored with the title of 'Mother of God,' to whose protection the faithful fly in all their dangers and needs. . . . This very special devotion . . . differs essentially from the adoration which is given to the incarnate Word and equally to the Father and the Holy Spirit, and greatly fosters this adoration."516 The liturgical feasts dedicated to the Mother of God and Marian prayer, such as the rosary, an "epitome of the whole Gospel," express this devotion to the Virgin Mary.517
  
  515 Lk 1:48; Paul VI, MC 56.
  516 LG 66.
  517 Cf. Paul VI, MC 42; SC 103.


The claim we are interested in is the one that is cited by footnote 516, which cites "LG 66". Looking at the list of abbreviations, we see that this refers to the 66th section of Lumen gentium, promulgated by Pope Paul VI in 1964. Section 66 shares much of the reasoning we see in the Catechism.


  66. Placed by the grace of God, as God's Mother, next to her Son, and exalted above all angels and men, Mary intervened in the mysteries of Christ and is justly honored by a special cult in the Church. Clearly from earliest times the Blessed Virgin is honored under the title of Mother of God, under whose protection the faithful took refuge in all their dangers and necessities.(21*) Hence after the Synod of Ephesus the cult of the people of God toward Mary wonderfully increased in veneration and love, in invocation and imitation, according to her own prophetic words: "All generations shall call me blessed, because He that is mighty hath done great things to me".(301) This cult, as it always existed, although it is altogether singular, differs essentially from the cult of adoration which is offered to the Incarnate Word, as well to the Father and the Holy Spirit, and it is most favorable to it. The various forms of piety toward the Mother of God, which the Church within the limits of sound and orthodox doctrine, according to the conditions of time and place, and the nature and ingenuity of the faithful has approved, bring it about that while the Mother is honored, the Son, through whom all things have their being (302) and in whom it has pleased the Father that all fullness should dwell,(303) is rightly known, loved and glorified and that all His commands are observed.
  
  (21) Sub tuum praesidium
  301 Lk. 1:48.
  302 Cf. Col. 1:15-16.
  303 Col 1:19.


Thus we hit a bit of a dead end as the Catholic Church affirms its usage of the title "Mother of God" not on scripture, but rather the fact that it existed in early works such as Sub tuum praesidium, the oldest surviving hymn to Mary, which has been dated AD 250-280. It was originally written in Greek, with the English text being as follows:


  Beneath your compassion,
  We take refuge, O Mother of God:
  do not despise our petitions in time of trouble:
  but rescue us from dangers,
  only pure, only blessed one.


"Blessed one" in the last line is a reference to Luke 1:48: "For he has looked upon his handmaid’s lowliness; / behold, from now on will all ages call me blessed." This verse was also cited in the CCC and Lumen gentium.

So it's clear from the Catholic Church's lack of scripture on these points in their official doctrines that there is no biblical basis for Mary having the title "Mother of God".

However, we get some insight if we look at when the title "Mother of God" (Greek "Theotokos", alternative translations would be "God-bearer" or "Birth Mother of God") was affirmed at the Council of Ephesus in 431. The principal opponent to this view was Nestorius, who argued that Mary should instead be called "Mother of Christ" (Greek "Christotokos"). 

Basically, Nestorius rejected the idea that a sinful, human mother could give birth to a sinless, divine Logos (today, the Church teaches the Immaculate Conception of Mary, which solves at least part of his claim). His opponents advocated that Jesus is fully God, the second person of the Trinity (based on scripture like John 1), and advocated the title "Mother of God" to affirm this. To be clear, they mean God the Son, and not all three parts of the Trinity. The council resulted in the decree "Anyone who dares to deny the Holy Virgin the title Theotokos is Anathema!" Nestorius refused to recant and was labeled a heretic.

So to recap:


The title "Mother of God" is not used in scriptures
The Catholic Church recognizes that early Christians used the title, such as in a hymn dated AD 250-280 
The Council of Ephesus in 431 declared it anathema to deny Mary the title "Mother of God"
The title was advocated for (as opposed to alternatives like "Mother of Christ") to emphasize the doctrine that Jesus is the second person of the Trinity


So Mary being the "Mother of God" is less about Mary's status and more about Jesus being the second person of the Trinity (and therefore Jesus being God). Thus if Mary is the mother of Jesus, and Jesus is God, then Mary is the Mother of God.