A thrush helps Bilbo and the dwarves figure out the secret of the door. At first, the dwarves attempt to open the door with with "picks and tools of many sorts from Lake-town," to no avail, because "magic had shut this door" (186).
When Gandalf showed the dwarves' map to Elrond in Rivendell, Elrond noticed the map had a secret message written in moon-letters, beginning with "Stand by the grey stone when the thrush knocks" (50). A proven master at riddles, Bilbo connects the message on the map with the habitual tapping of the thrush near the Lonely Mountain.
The "enormous thrush, nearly coal black, its pale yellow breast freckled with dark spots" was trying to crack open a snail's shell (189). Bilbo quickly gathers the dwarves and explains the thrush's significance to their puzzle, and as the sun sets, "the old thrush, who had been watching from a high perch with beady eyes...gave a sudden trill" (190). The dwarves hear a loud crack and a key hole appears in the stone.