This poem is not all hope-songs and tweety birds. In an odd way, things have to head pretty far south in life before hope really starts to matter to you. And that, folks, is where the storm imagery comes in. Dickinson breaks this out to give us a sense of how things can feel when the chips are down, the going gets rough, the Internet goes out, or, you know, a million other clichés for life's hardships.
Line 5: There's a fierce "gale" (rough wind) a-blowing, but that's no matter. It only makes the hope-bird's song sound that much sweeter. In other words, hope is most precious when we need it the most.
Lines 6-7: These lines are interesting, because they do admit that, in extremely dark times, hope might possibly be diminished. The word Dickinson uses is "abash," which usually means "embarrass" but could also mean "discomfort." For that to happen, though, that storm has to be pretty severe ("sore"). Think getting dumped on prom night.