
We call Our Lady “ever virgin.” Does this mean that somehow she remained a virgin even in giving birth to Jesus?
As you imply, if Our Lady was “ever virgin,” always a virgin, she had to be a virgin not only before giving birth to Jesus and after the birth, but in actually giving birth to him without rupturing her bodily integrity. The fifth Ecumenical Council, held in Constantinople in 553 AD, gave Mary the title “perpetual virgin,” in Greek Aeiparthenos. It is a dogma of faith. It had been taught by such Fathers of the Church as St Ambrose, St Jerome, St Augustine, St Epiphanius and St Basil. The latter wrote: “The friends of Christ do not tolerate hearing that the Mother of God ever ceased to be a virgin” (Hom. In S. Christi generationem, 5).
When we say that Our Lady was a virgin in giving birth we should understand what we mean. Every girl is born with her bodily integrity intact. This is broken if she has marital relations with a man. In the case of Mary, she conceived Jesus, not by St Joseph, but by the Holy Spirit, and so she remained a virgin in conceiving Jesus. But had she given birth to him in the natural way, she would have lost her virginal integrity when Jesus passed out of her body.
So what we are saying is that Mary remained a virgin even in giving birth to Jesus, with her bodily integrity still intact. Obviously, this is extraordinary, but so was Jesus’ virginal conception by the Holy Spirit. It is something that can only be explained by the power of God. God wanted his mother to be ever-virgin and so he brought it about.

The virginity of Mary in giving birth was expressly declared by Pope St Leo I in his Dogmatic Epistle to Flavian, which was approved by the Council of Chalcedon in 451: “For he was conceived by the Holy Spirit within the womb of the Virgin Mother, who gave birth to him in such a way that her virginity was undiminished, just as she had conceived him with her virginity undiminished … The Son of God, therefore, descending from his heavenly throne, enters into the infirmities of this world; and, not leaving his Father’s glory, he is generated in a new order and a new birth … Nor does the Lord Jesus Christ, born from the womb of a virgin, have a nature different from ours just because his birth was miraculous. For he who is true God is likewise true man, and there is no falsehood in this unity, in which the lowliness of man and the height of divinity coincide…” (Tome to Flavian, 2, 4).
The early Christians saw the miraculous birth of Jesus as a sign of his subsequent resurrection from the dead, when he passed out of the sealed tomb. As St Matthew relates, the Jews “made the tomb secure by sealing the stone and setting a guard.” When the women arrived early on Easter Sunday morning to anoint the body, they found the stone still in place, but “an angel of the Lord descended from heaven and came and rolled back the stone” (Mt 27:66-28:2). When they entered the tomb, the women found that Jesus’ body was no longer there.
St Ephrem, who died in 373AD, comments: “[The fact] that ‘they sealed the tomb’ (Mt 27:66) was in [the Lord’s] favour … He took the body out from the tomb, although it was sealed, and the seal of the tomb witnessed in favour of the seal of the womb that had borne him. For it was when the virginity was sealed that the Son emerged alive from within her … (Commentary on the Diatesseron, 21.21).

Other Fathers of the Church explained this mystery by using the analogy of the rays of the sun passing through glass without breaking it.
And Christian iconography represents the virginity of Mary before, during, and after the birth of Jesus with three stars, one on her forehead and one on each shoulder.
The Catechism of the Catholic Church explains it like this, quoting the Second Vatican Council: “The deepening of faith in the virginal motherhood led the Church to confess Mary’s real and perpetual virginity even in the act of giving birth to the Son of God made man. In fact, Christ’s birth ‘did not diminish his mother’s virginal integrity but sanctified it’” (LG 57; CCC 499).
