In Roman Catholic Mariology, Mother of the Church (in Latin Mater Ecclesiae) is a title, officially given to Mary during the Second Vatican Council by Pope Paul VI. The title was first used in the 4th century by Saint Ambrose of Milan, as rediscovered by Hugo Rahner.
The title "Mother of the Church" was used by Pope Benedict XIV in 1748 and then by Pope Leo XIII in 1885. The title was also used by Pope John Paul II and is also found in the Catechism of the Catholic Church.
Pope John Paul II stated that overall the title indicates the Blessed Virgin Mary's maternity of Christ's faithful, as deriving from her maternity of Christ in that "Mary is present in the Church as the Mother of Christ, and at the same time as that Mother whom Christ, in the mystery of the Redemption, gave to humanity in the person of the Apostle John [cf. John 19:27]. Thus, in her new motherhood in the Spirit, Mary embraces each and every one in the Church, and embraces each and every one through the Church."
The Church has traditionally portrayed the Blessed Virgin Mary together with the apostles and disciples gathered at that first Pentecost, joined in prayer with the first members of the Church. The title, Mater Ecclesiae is found in the writings of Berengaud, bishop of Treves (d. 1125). In the 1895 encyclical Adjutricem populi (Helper of the People) Pope Leo XIII wrote, "She is invoked as Mother of the Church and the teacher and Queen of the Apostles". Following the title's usage by Leo XIII, it was later used many times in the teachings of John XXIII and Paul VI,John Paul II and Benedict XVI.
The use of the Mater Ecclesiae title to the Virgin Mary goes back to Ambrose of Milan in the 4th century, but this was not known until its 1944 rediscovery by Hugo Rahner. Rahner's Mariology, following Ambrose, sees Mary in her role within the Church. His interpretation, based solely on Ambrose and the early Fathers, greatly influenced Vatican II and Pope Paul VI, who, quoting Ambrose, declared Mary the "mother of the Church".
The Mother of the Church, carries on in heaven her maternal role with regard to the members of Christ, cooperating in the birth and development of divine life in the souls of the redeemed. - Pope Paul VI's "Credo of the People of God".
Pope Paul VI pronounced the title at the closing of the third phase of the council. A former archbishop of Milan, Paul VI used similar language to that of Saint Ambrose of Milan, calling Mary Model of the Church in light of her faith, love and complete unity with Christ and Mother of the Church because she gave birth to Christ.
Paul VI made the pronouncement of the title Mother of the Church during his speech upon the closing of the third session of the Second Vatican Council on November 21, 1964: "For the glory of the Virgin and our consolation, we proclaim Mary the Most Holy Mother of the Church, that is, the Mother of the whole People of God, both the faithful and the pastors."
In Redemptoris Mater Pope John Paul II referred to Paul VI's "Credo of the People of God" as a reaffirmation of the statement that Mary is the "mother of the entire Christian people, both faithful and pastors" and wrote that the Credo "restated this truth in an even more forceful way":
Pope Benedict XVI also referred to the Credo of Paul VI and stated that it sums up all of the scriptural texts that relate to the matter.
In 1980, during the UNIV Forum, an annual gathering of university students from all over the world held in Rome during Holy Week and born by inspiration of Saint Josemaría Escrivá, founder of Opus Dei, a young man tooking part in the gathering told Pope John Paul II that he was not able to find an image of Our Lady in St. Peter's Square, heart of Christendom. In fact, although there are 162 statues of saints, none of them depict the Mother of God. The Pope answered immediately: "then we should finish the square". When Msgr. Álvaro del Portillo, successor of Saint Josemaría Escrivá, heard this story, he asked the Spanish architect Javier Cotelo to find a good solution for the image. In July 1980 and January 1981, Cotelo submitted to the Pope a proposal of using one of the windows of the building located between St. Peter's Square and the Cortile di San Damaso, since from there the image could be seen from any part of the square. The Pope accepted the suggestion and on December 7th 1981 a mosaic of Maria Mater Ecclesiae -Our Lady, Mother of the Church- was installed following Cotelo's proposal. On the following day, feast of the Immaculate Conception, the Pope blessed the mosaic from his window, and therefore this mosaic is considered to be last stone of St. Peter's Square. Moreover, this mosaic overlooking the square follows the 1981 assassination attempt on Pope John Paul II's life. It's also a tribute to the intercession of Our Lady in saving his life.
With regard to the title "Mother of the Church", John Paul used Redemptoris Mater as an opportunity to explain how the Blessed Virgin Mary's maternity of Christ's faithful derives from her maternity of Christ, as well as how Mary serves as a "type", or model, of the Church as a whole.
On September 17, 1997, Pope John Paul II devoted a Wednesday general audience to the title "Mother of the Church" with regard to its application to the Blessed Virgin Mary.
Pope Benedict XVI addresses the issue, why Roman Catholic Mariology is related to ecclesiology, the teaching about the Church. On first sight, he argues, it may seem accidental, that the Council moved Mariology into ecclesiology. This relation helps to understand what "Church" really is. The theologian Hugo Rahner showed that Mariology was originally ecclesiology. The Church is like Mary.
The Church is virgin and mother, she is immaculate and carries the burdens of history. She suffers and she is assumed into heaven. Slowly she learns, that Mary is her mirror, that she is a person in Mary. Mary on the other hand is not an isolated individual, who rests in herself. She is carrying the mystery of the Church.
In 2018, Pope Francis decreed that the Memorial of the Blessed Virgin Mary, Mother of the Church be inserted into the Roman Calendar on the Monday after Pentecost (also known as Whit Monday) and to be celebrated every year.  The decree was signed on 11 February 2018, the memorial of Our Lady of Lourdes, at the 160th anniversary of the Lourdes apparitions. It was issued on 3 March 2018.