There were only 300 Spartan soldiers at the Battle of Thermopylae. But, they were not alone, as the Spartans had formed an alliance with other Greek states. It is thought that the number of Greeks was closer to 7,000. The size of the Persian army is disputed. Fifth-century Herodotus claimed there were over two million; but, it was more likely to be between 100,000 and 300,000, so the Greeks were still up against overwhelming odds.

The Spartans were brutal warriors, raised never to surrender or show weakness. When a Persian ambassador ordered the Greeks to lay down their weapons, King Leonidas hit back with, “Come and take them”.

A Greek called Ephialtes betrayed his country by revealing a path to the Persians that allowed them to outflank Leonidas. Spartan King Leonidas dismissed most of the army and formed a rear-guard of around 1,500 men, including his 300 Spartans, 700 Thespians, 400 Thebans and a few hundred others, many of them slaves. They were wiped out but this sacrifice allowed the bulk of the army to retreat and regroup.

In the end, the Greeks won major victories, and the Persian invasion failed.

More Info: en.wikipedia.org