What was the relationship between Samuel and Mary?
When Hannah brought her son Samuel to the sanctuary, she sang to God, who lifts up the lowly. Centuries later, Mary sang the Magnificat. 1 Samuel 2:1, 7-8; Luke 1:46-55
What the Bible says
1 Samuel 2:7
The Lord maketh poor and maketh rich, he humbleth and he exalteth.
Luke 1:52
He hath put down the mighty from their seat, and hath exalted the humble.
Douay-Rheims Bible (Challoner revision), public domain.
What the Church teaches
The Mass of December 22 brings together the song of Hannah, as the psalm, and the song of Mary, as the Gospel.
Lectionary, Mass of December 22 · Catechism of the Catholic Church