Goldfish can live for up to three hours out of water.
It also depends on where your goldfish lands. If they landed somewhere moist or in the puddle of water they spilled out of their bowel, they can survive for around three hours. However, landing on a dry surface will kill them in about one hour, due to lack of breathable oxygen for their gills as well as other reasons as indicated by Lila in her comment:
Many aquatic organisms, including fish, are ammonotelic - they rely on being surrounded by water to constantly excrete nitrogenous waste, mainly by gills. Deamination of amino acids in protein metabolism produces ammonia which is highly toxic; mammals metabolize ammonia into urea which is relatively non-toxic and doesn't need to be immediately excreted, but most fish must rely on excreting ammonia immediately from their bodies. Being outside of water disables this and, on top of suffocating, also poisons them. More information: en.wikipedia.org/wiki/Metabolic_waste#Nitrogen_wastes
So... it never fully died.
Unfortunately, there is no such thing as a zombie goldfish.
vivofish.com - How Long Can Goldfish Live Out Of Water?