Did Mary Know That Jesus Was God?
To conclude that Our Lady was puzzled about Jesus or His mission is not warranted from the biblical text.
How much did the Blessed Virgin Mary know about Jesus? The Catholic Church teaches that the Holy Spirit revealed to Mary the knowledge of the divinity of Christ and His incarnation, from the beginning of the Annunciation: when the angel Gabriel informed her. Mary’s knowledge of Christ’s divinity from that time on is an explicitly biblical teaching:
Luke 1:26-35 (RSV-CE) In the sixth month the angel Gabriel was sent from God to a city of Galilee named Nazareth,  to a virgin betrothed to a man whose name was Joseph, of the house of David; and the virgin’s name was Mary.  And he came to her and said, “Hail, full of grace, the Lord is with you!”  But she was greatly troubled at the saying, and considered in her mind what sort of greeting this might be.  And the angel said to her, “Do not be afraid, Mary, for you have found favor with God.  And behold, you will conceive in your womb and bear a son, and you shall call his name Jesus.  He will be great, and will be called the Son of the Most High; and the Lord God will give to him the throne of his father David,  and he will reign over the house of Jacob for ever; and of his kingdom there will be no end.”  And Mary said to the angel, “How shall this be, since I have no husband?”  And the angel said to her, “The Holy Spirit will come upon you, and the power of the Most High will overshadow you; therefore the child to be born will be called holy, the Son of God.
Simeon’s prophecy perhaps informed her (if she didn’t know it already) of another aspect of her role as the Mother of God: that a sword would pierce her heart (Luke 2:25-35). The text (2:33) says that Mary and Joseph were “amazed” at these words, but that could just as easily refer to their amazement that Simeon had this knowledge and word from the Lord, as opposed to the content of his message.
Furthermore, Mary’s knowledge was — shall we say — “confirmed” when she visited Elizabeth, mother of John the Baptist, who called her the “mother of my Lord” (Lk 1:43). Right after that passage, we see Mary praising God in the famous Magnificat (Lk 1:46-55). For what? It was because she was to be the mother of the Son of God, the Messiah, God the Son, God incarnate, which is precisely why she has been called “blessed” (Lk 1:48). She obviously knew all this.
The prophetess Anna also appeared in the temple at that time and spoke about Jesus’ messianic mission (1:36-38). Not only did Mary and Joseph know full well Who Jesus was, but also all who heard (and believed) her words, or Simeon’s.
And that’s not even mentioning the preaching of John the Baptist and the knowledge of the Three Wise Men (Matthew 2:1-6, 9-11). Their knowledge that Jesus was Messiah was precisely what caused Herod to try to kill all the infants, so as to kill the Messiah, Jesus, among them (Matthew 2:7-8, 16-18). Lastly, Joseph was told by “an angel of the Lord” in a dream Who Jesus was, that “he will save his people from their sins” and that one of His names would be “Emmanuel, which means ‘God is with us’” (Matthew 1:18-25).
Yet some would have us believe that Mary — the very one whom an angel visited, to announce the virgin birth and incarnation — did not know what many others already knew soon after Jesus’ birth; that her celebrated “yes” or “fiat” to the angel’s glorious announcement (Lk 1:38) was made without having the slightest idea what she was consenting to? Such a scenario is beyond strange in its sheer implausibility.
Fr. William G. Most observed:
The traditional view holds that Mary did know the divinity of Christ at the time of the Annunciation.
Would God ask her to consent in the name of the whole human race, and still withhold from her knowledge of that to which she was consenting?
Most theologians believe that God had also given her infused knowledge of all that she needed to know at any given stage of her mission. (Mary in Our Life, Garden City, New York: Doubleday Image, 1963 [originally 1954], 278, 280, 240-241)
Venerable Archbishop Fulton Sheen concurs: “Mary’s mind was filled with the thought of Divinity in the stable” (The World’s First Love, New York: McGraw-Hill, 1952, 212). The Blessed Virgin Mary didn’t “grow in awareness” or “gradually figure out” Who Jesus was.
Some argue that Mary was unaware that Jesus was God the Son, or that she disagreed with His mission, based on the following passages:
Mark 4:21-22, 31 And when his family heard it, they went out to seize him, for people were saying, “He is beside himself.”  And the scribes who came down from Jerusalem said, “He is possessed by Be-el’zebul, and by the prince of demons he casts out the demons.” . . .  And his mother and his brothers came; and standing outside they sent to him and called him.
It is not at all clear that Mary is included among those “family” who were doubting Jesus (insofar as the doubt goes; she came, yes, but it is not stated or implied that she doubted or was puzzled). We know that some doubted and disbelieved, because we are informed of that in inspired Holy Scripture, and Jesus said that “a prophet is without honor in his home town.”
We can’t determine simply from this data, that Mary agreed with any of the negative appraisals. It’s an argument from silence. She may have gone out of concern (for any number of reasons, such as His personal safety from the unruly mobs), but to conclude that she was puzzled about Jesus or His mission, is not warranted from the biblical text.