It really does seem amazing that the Persian Empire, with all its resources, was repeatedly unable to conquer Greece. It seems equally as unlikely that Alexander and his much smaller Macedonian and Greek forces were able to completely topple the Persians.
The greatest difference between the Persian fighting forces and those under Alexander is clearly their size. During the invasions of Greece, the Persian forces were also far larger than all the Greek city-states could have been combined. While this may seem like an advantage at face value, it was actually a liability for the Persians. In order to keep such a large army fed and equipped while fighting abroad, a huge supply chain was necessary. As the campaigns in Greece went on, it became harder to maintain.
Furthermore, although there were many professional soldiers, much of the Persian army and its support network consisted of laborers and farmers who answered the call to arms. With so many men away from home at once, it became nearly impossible for the Persian domestic economy to function for very long. This created a time limit to the Greek campaigns.
It is also important to remember that the Persians nearly did defeat Greece. Many Greek states quickly allied themselves with Persia. Athens was sacked, and its government went into exile. However, once the prospect of quick Persian victories was eliminated, first at Marathon and then at Salamis, it became clear that the Persians would need several seasons to fully dominate the Greeks. They simply could not afford to keep such a large army mobilized overseas and a king absent from the throne.
Now let us turn our attention to Alexander. Unlike the Persians, he had a relatively small army. Thus, he did not require the same large support network. Although they did have supply lines back to Greece, his army was largely able to live off the land that they conquered, making them relatively nimble and self-sufficient.
We must also remember that Alexander invaded Persia as the empire was weakening. It never fully recovered from its defeats in Greece and had recently experienced a civil war and a series of rebellions.
In the end, it was Alexander's tactical genius that brought down the Persians. He was first able to outwit Darius at Issus. Over the next several battles, Alexander refined his battle tactics to take advantage of his army's speed and nimbleness. At Gaugamela, Alexander was able to draw the Persians into a complex trap that ended in the routing of their army and signaled their final defeat.