Goldfish may stop eating due to overfeeding, boredom with their food, stress or sickness. Poor water quality or a stressful environment can also make fish avoid food.
When goldfish stop eating, it can mean one of a few different things. Unless the goldfish is sick, most owners can fix the problem themselves by working on the diet or improving the fish's environment.
If the fish are under stress from a too small or unusually designed tank, it can keep them from eating. This is especially so for territorial species. Fish have a social hierarchy that can leave the lowest fish on the totem pole without any food. Removing a few fish from the tank or moving them to a larger, more traditional tank may help.
Dirty water can also stress fish and make them stop eating. Fish owners should test both their ammonia and nitrite levels. If either is above zero, work to get it back down again. It is also important to keep an eye on the water pH levels and the water temperature.
If the environment is fine, then fish may simply be overfed or not like their food. Consider establishing a regular feeding routine, and only feed as much food as the fish eat in its entirety. Leftover food goes uneaten and further dirties the tank. Owners may also want to vary the fish diet a bit to entice their goldfish.