The Gemara lists prophetic women, including Hannah, and treats her as a paradigmatic figure of prayer and prophecy. This is a classic rabbinic source for Hannah as Samuel's mother.
וְתוּ לֵיכָּא? וְהָכְתִיב: ״וַיְהִי אִישׁ אֶחָד מִן הָרָמָתַיִם צוֹפִים״, אֶחָד מִמָּאתַיִם צוֹפִים שֶׁנִּתְנַבְּאוּ לָהֶם לְיִשְׂרָאֵל. שֶׁבַע נְבִיאוֹת מַאן נִינְהוּ? שָׂרָה, מִרְיָם, דְּבוֹרָה, חַנָּה, אֲבִיגַיִל, חוּלְדָּה וְאֶסְתֵּר. שָׂרָה, דִּכְתִיב: ״אֲבִי מִלְכָּה וַאֲבִי יִסְכָּה״, וְאָמַר רַבִּי יִצְחָק: ״יִסְכָּה״ זוֹ שָׂרָה, וְלָמָּה נִקְרָא שְׁמָהּ יִסְכָּה — שֶׁסָּכְתָה בְּרוּחַ הַקֹּדֶשׁ, שֶׁנֶּאֱמַר: ״כֹּל אֲשֶׁר תֹּאמַר אֵלֶיךָ שָׂרָה שְׁמַע בְּקוֹלָהּ״. דָּבָר אַחֵר: ״יִסְכָּה״ — שֶׁהַכֹּל סוֹכִין בְּיוֹפְיָהּ.
With regard to the statement that forty-eight prophets and seven prophetesses prophesied on behalf of the Jewish people, the Gemara asks: Is there no one else? Isn’t it written with regard to Samuel’s father, Elkanah: “And there was a certain [eḥad] man from Ramathaim-zophim” (I Samuel 1:1), which is expounded as follows to indicate that Elkanah was a prophet: He was one [eḥad] of two hundred [mata’im] prophets [tzofim] who prophesied on behalf of the Jewish people. If so, why was it stated here that there were only forty-eight prophets? § The Gemara asks with regard to the prophetesses recorded in the baraita: Who were the seven prophetesses? The Gemara answers: Sarah, Miriam, Deborah, Hannah, Abigail, Huldah, and Esther. The Gemara offers textual support: Sarah, as it is written: “Haran, the father of Milcah, and the father of Iscah” (Genesis 11:29). And Rabbi Yitzḥak said: Iscah is in fact Sarah. And why was she called Iscah? For she saw [sakhta] by means of divine inspiration, as it is stated: “In all that Sarah has said to you, hearken to her voice” (Genesis 21:12). Alternatively, Sarah was also called Iscah, for all gazed [sokhin] upon her beauty.