Isaiah 66:7 foretells the painless virgin birth: "she brought forth; Before her pain came, she gave birth to a boy"; So painless birth is scriptural and that is how the Catholic Church interprets it.
And All the Church Fathers before AD 600 believed that Mary’s delivery was painlesssrc.
But what about the pain of the women in Revelation? It can be reconciled as:
Revelation is a prophecy of a Future event or is a cryptic narration of a future/past event. Pope St. Pius X says:
"John therefore saw the Most Holy Mother of God already in eternal happiness, yet travailing in a mysterious childbirth. What birth was it? Surely it was the birth of us who, still in exile, are yet to be generated to the perfect charity of God, and to eternal happiness. And the birth pains show the love and desire with which the Virgin from heaven above watches over us, and strives with unwearying prayer to bring about the fulfillment of the number of the elect." (Ad Diem Illum Laetissimum, 24)
The pain of the Woman may signify the suffering the people of Israel went through before the coming of the Messiah. cf. Jn. 16:21-22
The women in the Revelation is not just Mary, but denotes more than her. The Woman in Revelation 12 is a composite image of the Daughter of Zion, Mary and the Church. Not every detail of this figure applies to each. As Held by H.H Benedict XVI.src
The clause wailed aloud in pain as she labored to give birth is figurative and alludes to Mary's spiritual suffering as prophesied by Simeon when the infant Jesus was presented in the temple (cf. Lk 2:35).
Mary was preserved free from labor pains, not perpetual virginity is a non-infallible teaching of the Ordinary Magisterium and belongs to the deposit of faith. So Catholics are required to give their religious - as opposed to sacred - assent to this doctrine. Sacred assent applies to defined dogmas and the infallible teachings of the Universal Magisterium. But a non-infallible teaching isn't necessarily untrue because it hasn't yet been defined as dogma. It wasn't until the 14th century that the doctrine of the Real Presence of Christ in the Eucharist by transubstantiation was defined as dogma. Yet Catholics were required to profess their faith in this teaching of the Church.src - Italics mine
P.S: Catholics do not necessarily interpret bible literally