The Battle of Thermopylae was fought between an alliance of Greek city-states, led by King Leonidas of Sparta, and the Persian Empire of Xerxes I over the course of three days, during the second Persian invasion of Greece. It took place simultaneously with the naval battle at Artemisium, in August or September 480 BC, at the pass of Thermopylae ('The Hot Gates'). The Persian invasion was a delayed response to the defeat of the first Persian invasion of Greece, which had been ended by the Athenian victory at the Battle of Marathon. Xerxes had amassed a huge army and navy, and set out to conquer all of Greece. The Athenian general Themistocles had proposed that the allied Greeks block the advance of the Persian army at the pass of Thermopylae, and simultaneously block the Persian navy at the Straits of Artemisium.
A Greek force of approximately 7,000 men marched north to block the pass in the summer of 480 BC. The Persian army, alleged by the ancient sources to have numbered over one million but today considered to have been much smaller (various figures are given by scholars ranging between about 100,000 and 300,000), arrived at the pass in late August or early September. Vastly outnumbered, the Greeks held off the Persians for seven days in total (including three of battle), before the rear-guard was annihilated in one of history's most famous last stands. During two full days of battle, the small force led by King Leonidas I of Sparta blocked the only road by which the massive Persian army could pass. After the second day of battle, a local resident named Ephialtes betrayed the Greeks by revealing a small path that led behind the Greek lines. Aware that his force was being outflanked, Leonidas dismissed the bulk of the Greek army, and remained to guard the rear with 300 Spartans, 700 Thespians, 400 Thebans and perhaps a few hundred others, the vast majority of whom were killed.
After this engagement, the Greek navy at Artemisium received news of the defeat at Thermopylae. Since their strategy required both Thermopylae and Artemisium to be held, and given their losses, the Greek navy decided to withdraw to Salamis. The Persians overran Boeotia and then captured the evacuated Athens. However, seeking a decisive victory over the Persian fleet, the Greek fleet attacked and defeated the invaders at the Battle of Salamis in late 480 BC. Fearing to be trapped in Europe, Xerxes withdrew with much of his army to Asia (losing most to starvation and disease), leaving Mardonius to complete the conquest of Greece. The following year, however, saw a Greek army decisively defeat the Persians at the Battle of Plataea, thereby ending the Persian invasion.
Both ancient and modern writers have used the Battle of Thermopylae as an example of the power of a patriotic army of freemen defending native soil. The performance of the defenders at the battle of Thermopylae is also used as an example of the advantages of training, equipment, and good use of terrain as force multipliers and has become a symbol of courage against overwhelming odds.
 From Wikipedia