Thanks for the question.
I’m not a degreed theologian so I’d be interested in what my colleagues think on this topic.
In anticipation of the merits of Christ, Mary was born immaculate and therefore had no labor pains.
Now some will reference Revelation 12:2 but the things in the Book of Revelation are, for the most part, figurative and mystical. That said, this is in reference to the Church and the pains she would go under.
Dr. Mark Miravalle teacher of General Mariology in the following article, the third paragraph down notes:
The Catechism of the Council of Trent, which states Mary gave birth without experiencing . . . any sense of pain (the Roman Catechism/Catechism of the Council of Trent) and [PDF] RC 50; and,
the Church’s Liturgy, which states, She who had given him birth without the pains of childbirth . . .(BVM Collection of Masses, p. 117).
He also states:
Furthermore, it follows that Mary’s birth of Jesus would be a painless experience, since pain in childbirth is a punitive effect of original sin (cf. Genesis 3:15). Mary, being free from the penalty of original sin due to her Immaculate Conception, would likewise be free from the penalty of a painful process of childbirth.
Now one could also ask:
Did Mary experience any other pain, like emotional or spiritual pain?
I don’t believe the Church has spoken on this but I see no reason why we would not think that Our Blessed Mother did not experience these other pains; remember she was just as human as us though, unlike us, she was free from sin.
If so, can you reference the Scriptures where that is explained?
Oral Tradition of the Church
By rejecting the Oral Tradition of the Church, our separated brethren have no idea how much they are rejecting.
Though not Scriptural, no one can or should logically deny the writings of the very first Christians which can be found through various patristic sources.
“When God became known to us in the flesh, He neither received the passions of human nature, nor did the Virgin Mary suffer pain, nor was the Holy Spirit diminished in any way, nor was the power of the Most High set aside in any manner, and all this was because all was accomplished by the Holy Spirit. thus the power of the Most High was not abased, and the child was born with no damage whatsoever to the mother’s virginity.”
St. Gregory of Nyssa (A.D. c.335 - c.394), Against Eunomius, Hom. II, PG 45, 492
"Though coming in the form of man, yet not in every thing is He subject to the laws of man's nature; for while His being born of a woman tells of human nature; virginity becoming capable of childbirth betokens something above man. Of Him then His mother's burden was light, the birth immaculate, the delivery without pain, the nativity without defilement, neither beginning from wanton desire, nor brought to pass with sorrow. For as she who by her guilt engrafted death into our nature, was condemned to bring forth in trouble, it was meet that she who brought life into the world should accomplish her delivery with joy."
St Gregory of Nyssa (A.D. c.335 - c.394) , Homily on the Nativity
“In conceiving thou was all pure, in giving birth thou was without pain.”
+ St Augustine of Hippo, (A.D. 354 - 428), Sermon on Nativity
“After the normal nine-month gestational period, Christ was born at the beginning of the tenth, in accordance with the law of gestation. It was the birth that surpassed the established order of birth giving, as it was without pain; for, where pleasure had not preceded, pain did not follow. And just as at His conception He had kept her who conceived Him virgin, so also at His birth did He maintain her virginity intact, because He alone passed through her and kept her shut [Ezekiel 44:1-3].
While the conception was by ‘hearing’, the birth was by the usual orifice through which children are born, even though there are some who concoct an idle tale of His being born from the side of the Mother of God. For it was not impossible for Him to pass through the gate without breaking its seals. Hence, the Ever-Virgin remained virgin even after giving birth and never had converse with a husband as long as she lived.”
+ St. John of Damascus, (A.D. 676 - 787) Exposition of the Orthodox Faith, Bk. 4, Ch. 14
The pains of childbirth are caused by the infant opening the passage from the womb. Now it has been said above (28, 2, Replies to objections), that Christ came forth from the closed womb of His Mother, and, consequently, without opening the passage. Consequently there was no pain in that birth, as neither was there any corruption; on the contrary, there was much joy therein for that God-Man “was born into the world,” according to Isaiah 35:1-2: “Like the lily, it shall bud forth and blossom, and shall rejoice with joy and praise”
+ St Thomas Aquinas, A.D. 1225-1274, ST III, q. 35, a. 6).
I hope this helps,