Reasons to believe Mary was virgin at the time of Christ's birth

Recapping some points from question 28 of Thomas Aquinas' Summa Theologiae:

The Protoevangelium of James and other apocrypha

And [from the time she was three] Mary was in the temple of the Lord as if she were a dove that dwelt there

'You have been chosen by lot to take into your keeping the Virgin of the Lord.' But Joseph refused, saying, 'I have children, and I am an old man, and she is a young girl'

He has defiled the virgin whom he received out of the temple of the Lord and has married her by stealth

As the Lord my God lives, I am pure before him, and know not man

Apart from the protogospel of James, other apocrypha assert the perpetual virginity of Mary including:

We can take apocryphal sources for what they are, but this hints at how widespread the belief was in the early Church.

Church Fathers

Clement of Alexandria reportedly accepted the Protoevangelium of James without objection.

Origen

Therefore let those who deny that the Son is from the Father by nature and proper to His Essence, deny also that He took true human flesh of Mary Ever-Virgin; for in neither case had it been of profit to us men, whether the Word were not true and naturally Son of God, or the flesh not true which He assumed.
Athanasius. Discourses Against the Arians, 2:70. 360 A.D.

Further resources