Thermopylae was a hugely important battle because of its military tactics. During this battle, the Greeks used the narrow path called the "Middle Gate" as a defense to make the Persian army's greater numbers meaningless.
The Persian army, led by Xerxes, had 2.5 million soldiers, according to the historian Herodotus. This number is considered by scholars to be exaggerated - the real numbers are likely 200,000 on the side of the Persians and 7,100 on the side of the Greeks.
The Greek army used a narrow path to overcome this great difference in numbers and to force the Persians to advance in fewer numbers at a time. This tactic allowed many of the Greek soldiers to escape the battle in retreat, although it is not clear whether Leonidas ordered the retreat or not.
The Greeks lost the Battle of Thermopylae, but did ultimately win the war with the Persians. After Thermopylae, Themistocles took over the Greek naval fleet and defeated Xerxes in the Battle of Salamis using a sneak attack similar to Leonidas' tactics at Thermopylae. Xerxes fled Greece after this defeat, fearing future losses. About one year after Thermopylae and Salamis, the Greeks defeated the Persians in the Battle of Plataea and ended the Persian War.