1 Samuel 1:1-20 (NASB):
Now there was a certain man from Ramathaim-zophim from the hill country of Ephraim, and his name was Elkanah the son of Jeroham, the son of Elihu, the son of Tohu, the son of Zuph, an Ephraimite. He had two wives: the name of one was Hannah and the name of the other Peninnah; and Peninnah had children, but Hannah had no children.
Now this man would go up from his city yearly to worship and to sacrifice to the Lord of hosts in Shiloh. And the two sons of Eli, Hophni and Phinehas, were priests to the Lord there. When the day came that Elkanah sacrificed, he would give portions to Peninnah his wife and to all her sons and her daughters; but to Hannah he would give a double portion, for he loved Hannah, but the Lord had closed her womb. Her rival, however, would provoke her bitterly to irritate her, because the Lord had closed her womb. It happened year after year, as often as she went up to the house of the Lord, she would provoke her; so she wept and would not eat. Then Elkanah her husband said to her, “Hannah, why do you weep and why do you not eat and why is your heart sad? Am I not better to you than ten sons?”
Then Hannah rose after eating and drinking in Shiloh. Now Eli the priest was sitting on the seat by the doorpost of the temple of the Lord. She,greatly distressed, prayed to the Lord and wept bitterly. She made a vow and said, “O Lord of hosts, if You will indeed look on the affliction of Your maidservant and remember me, and not forget Your maidservant, but will give Your maidservant a son, then I will give him to the Lord all the days of his life, and a razor shall never come on his head.”
Now it came about, as she continued praying before the Lord, that Eli was watching her mouth. As for Hannah, she was speaking in her heart, only her lips were moving, but her voice was not heard. So Eli thought she was drunk. Then Eli said to her, “How long will you make yourself drunk? Put away your wine from you.” But Hannah replied, “No, my lord, I am a woman oppressed in spirit; I have drunk neither wine nor strong drink, but I have poured out my soul before the Lord. Do not consider your maidservant as a worthless woman, for I have spoken until now out of my great concern and provocation.” Then Eli answered and said, “Go in peace; and may the God of Israel grant your petition that you have asked of Him.” She said, “Let your maidservant find favor in your sight.” So the woman went her way and ate, and her face was no longer sad.
Then they arose early in the morning and worshiped before the Lord, and returned again to their house in Ramah. And Elkanah had relations with Hannah his wife, and the Lord remembered her. It came about in due time, after Hannah had conceived, that she gave birth to a son; and she named him Samuel, saying, “Because I have asked him of the Lord.”