In its essence, 300 is a retelling of Herodotos' account of the battle of Thermopylai (480 BC), meaning that its basic narrative is as historically accurate as we could hope for. However, there are at least 3 layers of historical inaccuracy piled on top of that, which makes the result ever so slightly less reliable.
The first layer is what scholars have long referred to as the "Spartan mirage". Much of what we think we know about the Spartans derives from later traditions glorifying their way of life and their achievements, and pigeonholing them as extreme examples of hard militaristic manliness and stoic heroism. A lot of that is notably absent from Herodotos, who does not seem to describe their society as being all that different from other Greek city-states. Modern scholars now recognise that a lot of what makes Sparta recognisably "Spartan" to us was first introduced at most a few generations before the Persian Wars, with supposedly ancestral elements continually being added all the way through the Classical period and after. Many other things we like to think of as typically Spartan never actually characterised their community at all. The Spartans who fought at Thermopylai would probably not recognise themselves in the half-naked, shouty testosterone engines of 300 (and they would presumably be even more alienated by the USMC-inspired habits that Frank Miller gave them in the graphic novel). They went into battle fully dressed, well groomed, untrained, and accompanied by their helot serfs.
While 300 retains some anecdotes lifted straight out of Herodotos (like the famous line about arrows blotting out the sun, and the point you noted about kicking emissaries into wells), a lot of other lines actually derive from later sources. Here's a familiar one:
The allies said they had no wish to be dragged this way and that to destruction every year, they themselves so many, and the Lakedaimonians, whom they followed, so few. It was at this time, we are told, that Agesilaos, wishing to refute their argument from numbers, devised the following scheme. He ordered all the allies to sit down by themselves, and the Lakedaimonians apart by themselves. Then his herald called upon the potters to stand up first, and after them the smiths, next, the carpenters, and the builders, and so on through all the handicrafts. In response, almost all the allies rose up, but not a man of the Lakedaimonians; for they were forbidden to learn or practise a manual art. Then Agesilaos said with a laugh: "You see, men, how many more soldiers than you we are sending out."
-- Plutarch, Life of Agesilaos 26.4-5
The story features Agesilaos, not Leonidas; it is set more than a century after Thermopylai. Moreover, it is first recorded by Plutarch, over 600 years after Thermopylai. Note also the conspicuous absence of the boastful "arooh! arooh! arooh!" used in the movie; again, the Spartans were never anything like Marines.
Bits like the famous line about the shield ("come home with it or on it") and the line about dining in hell (actually Hades) are also from Plutarch, along with most of the opening narration about the Spartan upbringing.1 Meanwhile, the line used in the movie about the Persian infantry ("those behind cried 'forward', and those before cried 'back!'") actually comes from a 19th century British poem about the legend of Horatius. The result of all this "inspiration" is a smattering of actual historical details about the Thermopylai campaign mixed together indiscriminately with accurate-but-anachronistic bits of later material, Spartan mythmaking about themselves, and modern mythmaking about Spartans (and others).
The second layer is the fact that it's a fantastical epic movie presented as the tall tale of the battle's sole survivor.2Zack Snyder obviously went overboard in presenting the enemy as a monstrous horde, with naphtha throwers, mutant concubines, deformed warriors, outsized war elephants, and war rhinos, all commanded by a nine-foot God King.3 He also almost entirely left out the presence of nearly 7,000 other Greeks, who took turns defending the pass. He openly admitted to changing parts of the Greek and Persian equipment to suit what would look better on film. This is why the Greek shields are all-metal (rather than wood with a thin bronze covering), and why the shield's double grip is not accurately placed.
He also included an absolutely ludicrous representation of the hoplite phalanx, where men crouch and push and trample; the crouching is complete nonsense, the pushing is controversial, and the Spartans may not even have adopted the phalanx formation yet at this time. The wild loose melee that a lot of people ridicule is actually more like the combat Herodotos describes at Thermopylai:
The Lakedaimonians fought memorably, showing themselves skilled fighters amidst unskilled on many occasions, as when they would turn their backs and feign flight. The barbarians would see them fleeing and give chase with shouting and noise, but when the Lakedaimonians were overtaken, they would turn to face the barbarians and overthrow innumerable Persians.
-- Hdt. 7.211.3
But of course, Snyder had to present a suitable spectacle, and so we even get a scene where Leonidas tells the deformed Ephialtes4 he is not tall enough to fight in the movie's imaginary form of the phalanx that the Spartans didn't actually use at the time.
This is also why the Persian Immortals are represented as actually immortal ninja warriors who dual-wield short swords. None of this has anything to do with historical reality. The Immortals are described by Herodotos as prominent Persian men, armoured in scale cuirasses and carrying bows, spears and tower shields.
The third layer is the dark, troubling introduction of modern Western neoconservative ideology. Frank Miller warps the story of Thermopylai into a tale of the noble, strong, beautiful, rational, freedom-loving West standing firm against the dark, corrupt, weak, despotic, irrational, ugly East. That this has no bearing on ancient reality should go without saying. The Greeks were if anything by far the less developed civilisation; democracy was only a few decades old, and the Spartans would never adopt it; and in any case, the dichotomy between Greek freedom and Persian tyranny is a nonsense. The Persians allowed the Ionians to keep their democracies when they reconquered the area in 494 BC. They also served as a conduit to teach the Greeks most of what the ancient peoples of their empire knew about science and philosophy. Herodotos himself offers a far more balanced picture of the conflict, in which the Greeks are roundly accused of ruining themselves with their constant in-fighting, and in which the Persians are greatly admired for their achievements in logistics and engineering, as well as the wisdom of its rulers before Xerxes.
The result is deeply inaccurate in everything from the equipment used (what the hell is that sword Leonidas is wielding? It looks most like a yataghan) to the morality of the story being told. It's more that there are a few almost-accidental glimmerings of the underlying true story than that there is an accurate version of history here with just some touches of aristic license.
1) In the movie, Leonidas is made to go through the agoge and the krypteia. Neither system is actually attested when Leonidas was a boy, c.530 BC; moreover, royal heirs were normally exempt from the Spartan upbringing, since there was no point in teaching a future king how to be an Equal. As it happens, however, Leonidas (and later Agesilaos II)was raised like a regular citizen, because he was only third in line to the throne when he was born.
2) Contrary to what the movie tells you, the survivor Aristodemos was not wounded but suffered an eye infection. He was not respected as the one who told the story, but disgraced and cast out as a coward for surviving where all the other Spartiates died. He went berserk at the battle of Plataia in 479 BC to redeem himself, charging at the enemy lines and getting himself killed. Even then, the Spartans refused to give him honours, saying that while he had proven he was not a coward, he had not acted with discipline like a proper Spartan should.
3) The Persians never deified their kings. I do not know why it was decided to refer to Xerxes as the God-King in 300. He was known to the Greeks simply as "the king" or "the Great King" - it was clear from the context who was being indicated.
4) In the story, Ephialtes is the son of a Spartiate, but hidden by his parents because of his deformity. The notion of Spartan eugenics again derives from Plutarch; there is no hint of it in the Classical evidence (other than manipulation of Spartan "breeding" as outlined by Xenophon). Meanwhile, in Herodotos' account, Ephialtes was an inhabitant of the region of Thermopylai, not a Spartan at all.