After the Persians took control of Ionia, the Ionians revolted and received aid from Athens, who were defeated and caused Darius the Great to seek revenge on Athens for their involvement in the revolt.
The Athenians were outnumbered and expected defeat but the Persians were not trained to fight the Greek phalanx and lost 6,000 men before declaring retreat.
They are moving to flank us, our only hope is to return to the city to defend it.
After the battle at Marathon Pheidippides was chosen to be the runner to deliver the message to not give up the city to the Persians. The run was roughly 26 miles and he died after delivering the message. The distance is what is used for the modern marathon today.
We can't turn, It's too narrow!
10 years later, Darius's successor, Xerxes attempts to invade Athens again. The Greeks held off the Persians for three days at Thermopylae but they were betrayed by a traitor who told the Persians of a secret path around the mountain to flank the Greeks.
There is a secret path around the mountain
After hearing about the Persians moving around the mountain to flank them, they decided to go back to Athens to defend the city leaving the Spartans to hold off the Persian advance so that they could escape. Their sacrifice served as a great inspiration to people all over Greece.
The Athenians sacrificed their city to trap the Persians in a narrow channel, preventing them from turning easily which allowed the Greek's smaller ships equipped with bettering rams to easily puncture the larger Persian fleet who were defeated as Xerxes watched from on top of a mountain.