Athenian democracy was badly shaken by the Peloponnesian War, which started in 441 BC. As the Athenians began to lose the war to the Spartans, some people, including men like Socrates and Plato, thought they should abandon the democracy and go back to an oligarchy. Alcibiades, whose relative Cleisthenes had started the democracy, wanted them to stick with the democracy. When they were desperate, the Athenians tried oligarchy, but it didn't help, and in 404 BC they lost the war anyway.
After the war was over, the Athenians did go back to their democracy, and the new democracy soon convicted Socrates of "corrupting the youth" and sentenced him to death. During the 300s BC, Athens was still a democracy, but not as powerful as during the Classical period. When Philip of Macedon came south from Macedon and attacked Athens, the Athenian army could not defend their city, and Athens fell under the control of Macedon.
From this time on, Athens was under the control of a monarchy. First the king was Philip, then his son Alexander, and then there were a lot of Hellenistic kings. Inside the city of Athens, the Assembly and the Council of 500 kept meeting, and the juries kept deciding cases, and the Assembly kept electing strategoi, but these groups could only decide things inside the city, and only so long as the king approved.
Only a hundred and fifty years later, the Roman army arrived and conquered Greece. Then Athens fell under the control of the Roman Republic. The democracy kept meeting inside Athens, but again they could only do what the Roman governors of Greece allowed. And after the time of Augustus, the Athenians were part of an empire - under the Roman emperors, and then, from the 1400s AD on, under the Ottoman Empire.