The Blessed Mother's prayer, the Magnificat (which is part of the Gospel for the feast of the Visitation, May 31), is very similar to the Canticle of Hannah. The author of the Magnificat (its first words in Latin are "Magnificat anima mea," meaning, "My soul magnifies...") probably adapted the earlier text.
The Bible presents Hannah, Samuel's mother, as praying this song of praise when she brought her son to Shiloh, to thank the Lord for his birth.
The Magnificat is such a beautiful prayer that the Church uses it every day at Evening Prayer, in the Liturgy of the Hours. It perfectly summarizes Mary's faith and trust in God and is also the longest direct quote from any woman in the New Testament.