It is common to find stories of unusual or miraculous births in various religious traditions (everything from impregnation by a god to a sterile woman suddenly conceiving and giving birth). This fact in itself, though, does not mean that Mary’s virginal conception was simply copied from another tradition.
The Catholic Church has consistently taught that the virgin birth of Christ is not just an idea or legend, but actual truth. Here it’s helpful to examine the idea of what we mean by “the Church” in relation to this teaching. It’s important to avoid the image of a group of people sitting around one day and deciding to use a virgin birth story in their new religion. Most of us can probably agree that the Gospel narratives are the closest we can get to the historical facts of Christ’s life, given that the Gospel writers investigated and recorded the oral traditions that flowed out of eyewitness testimony (cf. Luke 1:1-4). The fact that two of the Gospel writers (Matthew and Luke) specifically reference the virgin birth is significant.
The Catechism of the Catholic Church addresses this question from another angle:
“Some might wonder if we were merely dealing with legends or theological constructs not claiming to be history. To this we must respond: Faith in the virginal conception of Jesus met with the lively opposition, mockery, or incomprehension of non-believers, Jews and pagans alike; so it could hardly have been motivated by pagan mythology or by some adaptation to the ideas of the age. The meaning of this event is accessible only to faith, which understands in it the ‘connection of these mysteries with one another’ in the totality of Christ’s mysteries, from his Incarnation to his Passover.” (CCC 498)
In other words, the belief that Mary conceived not by man but through the Holy Spirit is fully consistent with core aspects of Catholic dogma. It is consistent with the fact that Jesus was both fully human and fully divine, as well as with the implications of that for our own redemption. The more fully we examine the totality of Christ’s life and mission, the more support we find for the truth of his being conceived through the power of the Holy Spirit.