Frank Miller, the story writer, and the director are on record stating that this movie is NOT historically accurate. It was written to make the store even more dramatic.
However, the story is based partly in "fact", as the account is recited in the histories of Herodotus.
You can read a surprisingly good summation of of the Battle of Thermopylae
here.
300 vs, 1 million... no. But it seems it was about 1000 vs 2.5 million (300 hundred being actual Spartans).