To make this clear: the following proves that this scene in the movie is obviously over-dramatized to suit an audience that wants to see the main characters have a greater impact on the story. If you're looking for a, "how did Peter Jackson justify this?" I don't think you'll find an answer beyond, "to make more money from a good action scene," until the extended edition comes out. This includes a press release by Warner Bros. which states:
The nine plus hours of new special features boasts audio commentary with Peter Jackson, the film’s director/producer/screenwriter, and Philippa Boyens, co-producer/screenwriter, as well as The Appendices, a multi-part documentary focusing on various aspects of the film and the Trilogy.
Per the usual, to fully understand a scene as important at The Battle of the Five Armies, you need to reference the original text that the movie is adapted from.
You'll find a detailed breakdown of the battle here. In the book, The Hobbit, the allied Free Folk (500 dwarves, 200 men from Laketown, and over 1000 elves from Mirkwood) are suffering heavy losses before (and all quotes are from the above link):
A great noise was heard: Thorin and his twelve Dwarf companions inside the mountain had thrown down the stone wall they had erected across the mouth of the gates, killing many Goblins. Thorin and Company then charged out to join the battle, covered from head to toe in the finest armour and weapons contained in the treasure hoard of the Lonely Mountain. Thorin advanced through the Goblins ranks all the way up to the gigantic Goblins that formed the Bodyguard of Bolg
At that point, Thorin cannot get past Bolg. In the movie, as you stated, Thorin and some of his companions leave the main battle to go find Bolg and kill him. Furthermore, this did not turn the tide of the battle. It wasn't until:
A number of Giant Eagles of the Misty Mountains arrived...With the support of the Giant Eagles, the battle turned back against the Goblins.
In the movie Legolas kills Bolg, but in the book it is actually Beorn who:
Drove through the Goblin lines, but paused to carry the wounded Thorin out of the battle. Beorn then returned to the battle with even greater wrath and smashed the ranks of the Bodyguard of Bolg, ultimately killing Bolg himself.
At this point, the battle was decided, and:
The Goblins eventually panicked and scattered, to be picked off by hunting forces from the victors later; many of the Goblin survivors died in the Mirkwood forest.