system
Given the following post, respond as if you're commenting on Reddit:
human
[LOTR] Why was Gandalf's arrival so decisive at Helms Deep?

Near the end of the Battle of Helms Deep, the 10,000+ army of orcs and uruk-hai had breeched the wall and was on the verge of victory. Then Galdalf showed up with what looked like less than 1,000 soldiers (horsemen in the film, I think mostly foot soldiers in the book), and the orc army completely falls apart within a few minutes.

How did this happen? How did the orcs go from imminent victory to total defeat, just because of an army that was less then one tenth the size of their own?
gpt
Based on the movies: The flanking charge was used to its greatest effect. High ground, cavalry charging undisciplined troops with the rising sun to their backs. (Orcs don’t like the sun.) They even had a damn wizard fighting on their side.

Even worse, those handful of scrappy human defenders who have killed hundreds so far just came back out for more. 

It’s a huge change of momentum in the battle that was almost won. It would have been a morale killer for the Uruks, which may have played a bigger role in their defeat than casualties from the charge itself. They may not have even realized they still had a large numerical advantage.

As for the books, the troops coming to their add was actually a more established army under Erkenbrand (Eomer himself was at the battle all along). In addition, there were allies of the Ents called Huorns that made the trip to help out. Creepy moving murdering forest is also a morale killer.