TDOS begins in Bree. It is a scene in which Thorin meets Gandalf. This is not from the original story, but it does have its roots with Tolkien. As is common, though, Jackson changes it around a bit. In the Tolkien source material, it is Thorin who seeks out Gandalf. However, in the movie it is Gandalf who seeks out Thorin.
The movie then jumps ahead a year to shortly after the end of AUJ. In the book, Gandalf takes the company to Beorn’s, but Beorn is not in his bear form yet. They go into his house two at a time and ask for help. After he agrees to help them, it is when he goes out at night that they find out about his bear form.
When the company reaches Mirkwood, in the book it was always Gandalf’s intention to leave them. He didn’t receive a special message from Galadriel telling him to do so, as seen in the movie. He had to go meet with the White Council. The book does not clarify who all is in the White Council, but other Tolkien source material indicates that it would have been at least Galadriel, Elrond, Saruman, Radagast, and Gandalf.
Continuing on the Gandalf storyline: His visit (actually, visits) to Dol Guldur takes place far earlier in the Tolkien source material. He actually visited the first time about 900 years prior to the events of the book and movies. At that time, Sauron was not ready to combat him, so he retreated and came back about 400 years later. Then, about 100 years prior to the events of the book and movies, Gandalf again visits Dol Guldur. This time, he finds Thrain, Thorin’s father. Thrain had been the keeper of the last Dwarven ring, and Sauron had imprisoned him and taken it away. It was when Gandalf found Thrain in Dol Guldur that he received the map and key to Erebor (the Lonely Mountain).
Returning to Thorin and Company: It took them much longer to get through Mirkwood than portrayed in the movie. In fact, they did not encounter the spiders until they were most of the way through it. And how they did so was completely different. They did, indeed, send Bilbo up the tree to see how much further the forest was, but actually, in the book, he could not see anything beyond the forest. He descended the tree and gave the dwarves the bad news that the forest continued on forever. They were actually in a low spot, though, so Bilbo just couldn’t see over a hill.
On to the spiders (and the elves): In the book, the company is out of supplies in the forest. At night they see a fire off in the distance, so they leave the trail to see what is going on. They find the fire in the middle of a clearing, and there are a bunch of elves partying around it. As soon as the dwarves enter the clearing, though, the fire goes out and the elves disappear. This happens a few times, and actually different members of the company fall under an enchantment as it happens. Eventually, Bilbo gets separated from the rest of the company, and the dwarves get captured by the spiders. (Bilbo was never captured, despite what was seen in the movie.) Bilbo puts on the Ring (he never takes it off around the spiders, despite what was seen in the movie), taunts the spiders, leads them away from the dwarves, and eventually circles back and frees the dwarves.
It is after the dwarves are freed from the spiders that they are captured by the elves. They are weakened by spider poison and put up no defense. And they are put in cells separated from each other so that they cannot communicate and plot together. They are also held for quite a while before Bilbo comes up with a plan to save them. He sneaks into the elven kingdom as shown in the movie, though.
Regarding the elves: Neither Legolas nor Tauriel were in the book. Tauriel was actually completely made up for the movie. Tolkien source material identifies Thranduil as the Sindarin (grey elves) king of the Silvan (green elves) of Mirkwood. Thranduil is not named in the narrative of the book, though. He is just called the Elvenking. Tolkien source material also identifies Legolas as Thranduil’s son. As elves are very long-lived, it makes perfect sense that Legolas would be one of the Mirkwood elves seen in this movie. Even though Tauriel is made up, I like how she is portrayed as a Silvan elf. The Sindar were a higher order of elves, so it makes sense that Thranduil would kind of look down on her and not want Legolas to court her.
The dwarf escape was completely changed for the movie, too. In the book, Bilbo just leads them to the empty barrels and hides them. The elves are actually the ones that send the barrels (filled with dwarves) into the river, and they float all the way to Lake Town that way.
I suppose that I should say something about Azog and Bolg, too. In the Tolkien source material, Azog was actually killed something like 150 years prior to the time of the narrative. He was killed by Dain, Thorin’s cousin, at the battle outside the gates of Moria that is shown in flashbacks in AUJ. So he does not come up in the narrative at all. Bolg does not come into the narrative until the end when he leads the orcs (goblins in the book; in Tolkien lore, goblins and orcs are basically the same species, not different as seen in the movies) to the Battle of Five Armies.
In the book, the dwarves are not found by Bard. They are just found by lake men when they go to recover the barrels. They are then immediately taken to the Master of Lake Town. The movie portrays the Master pretty well, though. He doesn’t like the dwarves, but he sees that the people are excited to have them there. So he pretends to be excited, too. The dwarves stay in Lake Town for quite a while, and then they are sent on to Erebor with a bunch of supplies. All of the dwarves go on to Erebor instead of the four staying behind as in the movie.
Once they arrive at Erebor, not all of them go up to the ledge where the secret door is. They set up a camp lower down for their supplies. Then they set up ropes in which they climb back and forth from the camp to the ledge.
The entire time that Bilbo is around Smaug, he leaves the Ring on. The first time that he goes down, Smaug does not wake up immediately. Bilbo grabs the closest thing that he can find (a golden cup), grabs it, and runs back up to the dwarves. After a little time, though, Smaug stirs, notices the cup is missing, becomes angry, and leaves the mountain. All of the dwarves hide in the tunnel, but Smaug destroys their supplies and eats their ponies. Because he ate the ponies, he could tell that there were dwarves nearby. He could not place Bilbo’s species, though. Then Smaug goes back into the mountain and settles down.
Eventually the dwarves send Bilbo back down. This time, Smaug is awake and converses with Bilbo. Through their conversation, Smaug becomes angry and then leaves to go destroy Lake Town. The dwarves hide in the tunnel and mountain again when Smaug leaves. There is no big chase scene between the dwarves and Smaug as seen in the movie.
The Black Arrow is not an oversized arrow that is shot from an oversized bow. It is just a standard-sized arrow shot from a regular bow. It likely has some enchantments on it, but the source material never elaborates. It just says that it has never failed Bard.