The movie '300' is based on an actual battle, the Battle of Thermopylae

The Battle of Thermopylae, in 480 BC which took place during the second Persian invasion of Greece. In short, the war started when Xerxes I of Persia (modern day Iran) invaded Greece with a force that modern scholars number anywhere from 150,000 to 300,000 men. 7,000 Greeks, led by King Leonidas I, stood ready to oppose the invasion and defend Greece.

The vastly outnumbered Greeks held off the Persian invaders for 7 days, until King Leonidas I realized that he was about to be overran by the enormous Persian army. In a sacrificial effort, King Leonidas I let most of his army retreat while he stayed at the Thermopylae pass in order to buy his retreating army time to get away. The battle which followed was forever immortalized in the movie 300. The war dragged on for another year and a half after this battle, which the Greeks eventually won.