No, she didn't know. Her reaction to the angel's appearing and greeting and her questions to his announcement show that she didn't know.
If she knew, the angel would not have had to tell her and explain how it was going to happen.
Luke 1:26-38 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, "Greetings, O favored one, the Lord is with you!"
But she was greatly troubled at the saying, and tried to discern 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 forever, and of his kingdom there will be no end."
And Mary said to the angel, "How will this be, since I am a virgin?"
And the angel answered 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. And behold, your relative Elizabeth in her old age has also conceived a son, and this is the sixth month with her who was called barren. For nothing will be impossible with God." And Mary said, "Behold, I am the servant of the Lord; let it be to me according to your word." And the angel departed from her.
You worked so hard to prove your point that you missed the context of the words of the song.
Did she know before the angel visited her? No. But in your zeal to prove a point, you put blinders on and answered a question that the words of the song did not ask.
Mary had not just been told who Jesus was, she had direct experience of who he was, having been overshadowed by the Holy Spirit at His conception!
Now, then....Did she know in the context of the words of the song? In ways you and I cannot fathom.
If you now go back and listen to the questions being asked of Mary in the song, in the proper context as asked, then you will come to the same understanding.
Have a Merry Christmas.