Everyone hopefully knows by now that surprise pets are not appropriate gifts.
But just in case you were planning to make an exception for fish(Or maybe you were planning on a non-surpise fish), keep in mind that a goldfish is supposed to live decades.
They die early because people don't take care of them.
Properly taking care of them involves a lot of work, and making sure the water has just the right balance of chemicals, and the industry seems to think that's too hard. So the stores just accept that most fish won't reach their natural lifespan.
But you don't have to! Go on an Aquarium forum and see what is really involved. Read the reviews of any product you might want to use, and make sure it's not poison (Even if it says it's safe!).
Just like how birds are sensitive to anything in the air(Do NOT overheat any nonstick Teflon-ish polymer anywhere near them, ever), fish are sensitive to things in the water.
Try a bag of Swedish Fish instead?