The way the Liturgy of the Word is structured (for special feasts and seasons, and most Sundays), there is ideally a kind of parallel or "match" of some sort between the first reading (from the Old Testament) and the Gospel. The Responsorial Psalm is meant to provide us with a prayer that we can carry through the day as an ongoing response to the Word of God.
Today's Liturgy of the Word turns that around a bit. Instead of there being a match between the first reading and the Gospel, it is the Responsorial Psalm (which isn't even from the book of Psalms!) that is the Gospel parallel. In fact, Scripture scholars would say there is a pretty direct correlation between the two: Hannah's canticle and Mary's Magnificat. (Of course, Mary had a lot more to sing about!)
Hannah's story is one of those lovely "types" that the Old Testament is so full of: real people and real events that were also prophetic hints of even better things God had in store.