Bilbo and the Dwarves enter Erebor and re-claim the Arkenstone. They fail, however, at killing Smaug, who leaves the mountain and flies off to attack Laketown. Meanwhile, Sauron imprisons Gandalf, and his evil armies depart to terrorize Middle Earth.
The movie begins in flashback with Gandalf (Ian McKellen) meeting the Dwarven king Thorin (Richard Armitage) and convincing him to go on a quest to reclaim their former home, a treasure-filled mountain called Erebor. The Dwarves had been expelled from their home by the great dragon, Smaug (voiced by Benedict Cumberbatch), who wanted the treasure amassed by Thorin's greedy ancestors. Gandalf notes that they will need to steal the Arkenstone from Smaug (which is a stone that will unite the Dwarves under Thorin's leadership) and for that, they need a thief.
We jump ahead to rejoin the story, as Thorin, Bilbo (Martin Freeman) the Hobbit and thief, Gandalf, and the rest of the Dwarves flee from some orcs led by Thorin's old nemesis Azog (Manu Bennett). They are also pursued by a giant bear creature, and manage to find cover in a barn for the night. It is later discovered that the bear is a shapeshifter named Beorn who hates Orcs as they wiped out almost his entire race. Beorn agrees to lead the Dwarves and company to the forest they must traverse to reach Erebor. Azog is recalled to his fortress by his master, the Necromancer, and assigns his commander Bolg the task of killing the Dwarves. Gandalf also departs the party to investigate the tombs of the Nazgul (evil creatures who were thought dead) because he fears that if the Necromancer resurrected them, then the Necromancer could be more evil and powerful than originally thought. Bilbo considers telling Gandalf about the Ring he won from Gollum in the last film, but ultimately doesn't do so.
The Dwarves get lost in the forest and are eventually captured by giant spiders, though Bilbo eludes them due to the Ring's ability to make him invisible. Bilbo frees the Dwarves and they fight the spiders, with the evil Ring making Bilbo more savage than usual. The Spiders overwhelm the group, when wood-elves led by Prince Legolas (Orlando Bloom) and Tauriel (Evangeline Lilly) arrive and slaughter the remaining spiders. They also arrest the Dwarves for trespass (Bilbo again eludes capture). Meanwhile, the Necromancer tells Azog is that he will command the Necromancer's army in an assault against Middle-Earth.
The Dwarves are imprisoned, though Tauriel takes a liking to the Dwarf named Kili. The elf king promises to arm and release Thorin and his cohorts to continue their quest, so long as Thorin returns several elvish jewels within Erebor to him. Thorin rebuffs the Elf-King, who then orders them locked up for 100 years. Thanks again to the Ring, Bilbo infiltrates the palace and releases the Dwarves. At that moment, Borg and the Orcs attack the kingdom and Kili is injured by a poisoned arrow as they make their escape. The orcs are repelled, and the Elvish King orders his palace to be closed with everyone safe inside. Tauriel decides to disobey the King and goes off after the Dwarves, saying that the Elves need to take a stand against the growing evil. Legolas goes after her, as he is in love with Tauriel.
The Dwarves meet a man named Bard (Luke Evans) who agrees to take them to Laketown (a town near Erebor) and give them supplies and weapons in exchange for all their remaining money. Kili grows sicker by the day, and when they arrive, they discover that Laketown is essentially a police state led by a corrupt Master (Stephen Fry). It turns out that Laketown was decimated by Smaug in his attack on Erebor. Bard is the descendant of the king of Laketown at the time of the attack and considered a rebel by the Master. Bard's family is disgraced as Bard's ancestor shot several dragon-killing arrows at Smaug, but failed to strike a moral blow (one of the arrows did break apart Smaug's scaly armor below one of his wings). Once Bard learns of Thorin's quest, he tries to stop them as he fears they will awaken Smaug who will then decimate Laketown again. Thorin allies himself with the Master, promising to share the treasures in Erebor with the town. The Master imprisons Bard and arms the Dwarves. Thorin and company depart for the mountain, leaving behind the wounded Kili and several others rather than have them slow him down. The secret door of Erebor may only be opened by the last light of the last day of Autumn (which happens to be the day of their departure), so Thorin has no time for those who would slow them down.
Meanwhile, Gandalf discovers the Nazgul have been resurrected. He tracks them to the Necromancer's secret fortress where he discovers the great evil army being assembled. Gandalf fights off Azog and goes to warn his fellow wizards when he is confronted by the Necromancer. During the fight, he discovers that the Necromancer is Sauron - the greatest evil ever known to Middle Earth and thought dead after the last Great War. Sauron overwhelms Gandalf and imprisons him in the fortress as Azog marches Sauron's new forces against Middle Earth.
Bolg attacks the Dwarves remaining in Laketown, but they are defeated by Tauriel and Legolas who have finally caught up with them. Bolg escapes from the Elves' clutches and Legolas is heartbroken when Tauriel remains behind to heal Kili rather than pursue Bolg with him. Meanwhile, Thorin and company find the secret entrance to Erebor (revealed by the light of the last Autumn moon) and Bilbo is sent in to steal the Arkenstone. Unfortunately, Bilbo awakens Smaug, who deduces that he was sent by Thorin to retrieve the Arkenstone. Bilbo does get possession of it the Arkenstone before fleeing from Smaug's wrath. Bilbo meets Thorin who came in to help him, but blinded by greed, Thorin threatens to kill Bilbo unless he immediately gives him the Arkenstone. The other Dwarves arrive and, before Thorin can do anything rash, Smaug attacks the entire group.
The Dwarves and Bilbo trick Smaug into re-lighting their forges, which they use to melt down some of the gold treasure. The Dwarves then poor the molten gold atop Smaug, believing it will kill the dragon. Smaug manages to survive the attack and, believing Bilbo to be a resident of Laketown, flies out of the mountain to destroy Laketown once and for all. The Dwarves and Bilbo watch Smaug fly off to Laketown, in horror at what they have wrought.
Thanks Evan B!