Why might a closed ecosystem fail?
All ecosystems have as an underlying function--the transport of energy into, within, and out of the system. In parallel with the energy flow, there are similar inputs and outputs in a system. Open means "in the real world" or "in the wild" or "very large" while closed means "in captivity" or "very small". As an example I offer a temporary desert pond after a rain which is "in the wild" yet small and temporary and thus, a closed ecosystem. While this is a closed ecosystem, some highly specialized organisms such as Desert Pupfish have adapted to survive and reproduce in these temporary ponds.
In an aquarium with fish, snails, plants and gravel the energy and other "inputs" and "outputs" must be monitored and controlled. Your example does not mention the use of filtration, airpumps, food or maintenance so my answers are guesses as to how you set up your "ecosystem"
1) Too little food result in the fish starving or consuming the plants instead of food and eventually removing the plants through overfeeding. Either way, oxygen levels drop and have to be compensated by some technological means. If these conditions continue fish die and this creates bacterial blooms which drops oxygen levels further resulting in a failed "ecosystem".
2) Food supply is limited which limits reproduction and balance is maintained. After a period of time, waste accumulates as there is no complete recycling in a closed ecosystem. This results in accumulated toxins and reduced oxygen levels and again...the system fails.
3) Closed ecosystems are much more sensitive to environmental changes. If the temperature rises unexpectedly, the respiratory (and other physiological) rates of most of the organisms increase while the dissolved oxygen decreases resulting in the death of organisms and once again a failed ecosystem.