"Talk no more so exceeding proudly; let not arrogancy come out of your mouth: for the Lord is a God of knowledge, and by him actions are weighed." (1 Sam 2: 3)
That Hannah was different had been clear to everyone well before she married Elkanah. Elkanah loved her for it: for her forthrightness, for her honesty before the Lord and men, and for the way that, when she prayed silently--something she was not afraid to do in public--her mouth still moved, as if her body couldn't help but participate in the prayer.
To most people, of course, her fervent prayers just made her look like an intoxicated and possibly schizophrenic bag lady, and they felt it detracted from the spirit of the Temple when she prayed outside of it.
So no one was really surprised when Hannah couldn't have children. In the thinking of the time, which tended to look for the quickest possible explanations, her barrenness was seen as a consequence of her actions. Once she was barren, confirming that her weirdness was not of God, it was much easier for people to publicly voice their concerns about her.
People used to tell Hannah that she was a bad representative of the House of Israel because she couldn't have children. They used to ask Elkanah if she was really committed to the Church. Some speculated that if she'd start acting more normal, she might yet give birth. Most figured, though, that it was already too late.
But Hannah kept praying like a drunk, lips silently moving. Kept saying what she felt instead of what she thought ought to be said. And God heard Hannah--oh yes, God loved few things more in those days than to listen to Hannah's prayers.
It may be of interest to contemporary audiences to know that even before Hannah's son was born, she promised God she'd never cut his hair.