Both Matthew and Luke have accounts of the birth of Jesus to Mary in Bethlehem, and both assert that Mary's pregnancy was ‘by the Holy Spirit’ and not by her husband Joseph—hence she is known as ‘the Virgin’. In Matthew the child Jesus receives a visit from the Magi, and Mary and Joseph then temporarily retreat to Egypt to escape the wrath of Herod. Luke's narrative is told from Mary's point of view; it includes the Magnificat, the visit of the shepherds, the postnatal purification ceremony in the Temple, and greetings from Simeon and Anna. Cf. Presentation of Jesus.
There is no birth narrative in Mark, and the references to Mary in that gospel are not very flattering. In Mark 3: 21 Jesus' family thought he was mad and when Mary and his brothers arrive and remain outside the house (3: 31), Jesus said that it was those who do the will of God, not those of his family standing without, who are his true family. In Mark 6: 3 Jesus is said to be ‘the son of Mary and brother of James, Joses, Judas, and Simon’ by the shocked and un‐believing congregation in the synagogue. Mary the mother of James and Joses is also mentioned at Mark 15: 40 as ‘looking on from a distance’ at the crucifixion, and this could identify her as the mother also of Jesus. In Mark 16: 8 the same group of women fled from the empty tomb (which they alone are recorded to have seen), disobeying the command to tell the disciples of the resurrection, because they were afraid (16: 8). In Mark's view those nearest to Jesus did not demonstrate faith in him any more than did Peter and the other eleven disciples in the earlier part of the gospel or the members of the synagogue in his home town (Mark 6: 6; assumed by Luke 4: 16 to be Nazareth).
Such disparagement of Jesus' family (his brother James became a leader of the Church in Jerusalem, Acts 15: 13; Gal. 1: 19) was unwelcome to Mark's successors, who modified his references to Mary to ensure her reputation, not only by including the beautiful infancy narratives but also by omitting Mark's statement (Mark 3: 21) that the family intended to restrain Jesus; and Matthew (28: 8) adds the account, at the end, of the two Marys running with joy to the disciples. They believe. Luke makes similar editorial alterations, and at Acts 1: 14 he has Mary and the brothers in the Upper Room along with the eleven disciples.
John's gospel does not mention Mary by name, and there is something of a return to Mark's theology in the apparent discourtesy of Jesus to his mother in John 2: 4 at the wedding in Cana. But in 19: 25–7 Mary stands at the foot of the cross and is taken away by the Beloved Disciple. In this incident she seems to be portrayed as a symbol of Judaism the mother of Christianity, which is represented by the believing Beloved Disciple.
Mark's theology was that God would save; though when this would be even the Son did not know (Mark 13: 32). We can only trust, without any support from those nearest to Jesus. Unsurprisingly, later evangelists complemented Mark's partial message, and Mary, like her infant son, grew in stature. By the time of the apocryphal book of James in the 2nd cent. Mary's virginity was regarded as ‘perpetual’ (the ‘brothers’ of Jesus could be regarded as ‘cousins’ in the Greek), and at the Council of Ephesus (431 CE) Mary is accorded the title Theotokos, ‘Mother of God’; which safeguarded the two‐natures doctrine of Christ, God and Man.