The two gospels that give the claim tell it from opposite sides and agree on very little else. In Matthew the narrative follows Joseph, who learns of the pregnancy, plans to divorce Mary quietly, and is stopped by a dream; the family is in Bethlehem, flees to Egypt, and settles in Nazareth afterwards. In Luke the narrative follows Mary, who is told directly and answers; the family lives in Nazareth, travels to Bethlehem for a registration, and returns. The two genealogies of Jesus differ as well, and both run through Joseph, which is itself a puzzle the tradition has had to explain.
Matthew quotes Isaiah as fulfilled: behold, a virgin shall conceive. The Hebrew of that verse uses almah, a young woman of marriageable age, which does not by itself specify virginity; the Greek Septuagint renders it parthenos, which ordinarily does. Whether the Greek translation shaped the Christian claim or was reached for afterwards to support a claim made on other grounds is a genuine and long-running argument among scholars, and the two positions are not separable by the text alone.
Mark, which is generally taken to be the earliest gospel, begins with an adult Jesus and says nothing about his birth. John opens with the Word rather than with a nativity. The letters of Paul, written before any of the gospels, say that Jesus was born of a woman and born under the law, and no more.