By reason of the gift and role of divine maternity, by which she is united with her Son, the Redeemer, and with His singular graces and functions, the Blessed Virgin is also intimately united with the Church. As St. Ambrose taught, the Mother of God is a type of the Church in the order of faith, charity and perfect union with Christ.  For in the mystery of the Church, which is itself rightly called mother and virgin, the Blessed Virgin stands out in eminent and singular fashion as exemplar both of virgin and mother.  By her belief and obedience, not knowing man but overshadowed by the Holy Spirit, as the new Eve she brought forth on earth the very Son of the Father, showing an undefiled faith, not in the word of the ancient serpent, but in that of God’s messenger. The Son whom she brought forth is He whom God placed as the first-born among many brethren, namely the faithful, in whose birth and education she cooperates with a maternal love.

Second Vatican Council 

Lumen gentium