That's too bad about the little comet. Though from the picture he did look pretty skinny and stunted (common or comet goldfish given away at carnivals are usual small/runty 'feeders' and have poor overall health). Really, giving away any animal to people who may not have the space or have done the research is a bad idea overall.
There's not as many options with such a small tank, but there are some interesting things you can do with a five gallon with the right fish, research and some patience.
Here are some good options:
Bettas:
These guys can thrive in both still water and filtered environments, and are very beautiful, personable fish (that retain a small size). Filter or not, the one thing these guys do need is a heater of some type (nothing fancy). They are a tropical fish (native to southern asia) and like temperatures around 75-85 degrees. Contrary to popular belief, you can place some other fish with bettas (though be careful with mixing species, as always). If mixing with other fish, a filtered and cycled tank is a must!
Good tankmates are otos (small cleaner fish, but you'll want to wait until you are at the end of your cycle (reading under 0.2ppm of ammonia), shrimp (amano or other cleaning shrimp), snails or a small school of white cloud minnows. Speaking of which:
White Cloud Minnows:
Love love LOVE these fish! Unlike tetras, these attractive little schooling fish are super hardy and easy and much more tolerant of small spaces. A five gallon would happily house ten or so of these guys (unlike tetras, which would need a bigger school and a bigger tank). As well, these guys will mix with almost any peaceful community fish. They also do not get tetra disease, the bane of many a fishkeeper!
Endlers Livebearers:
Another lovely small, but amazingly beautiful and hardy fish. These guys would mix well with the white cloud minnows (but not the betta unfortunately), though you would want to end them near the end of the cycle. Like a super awesome guppy but smaller!
Dwarf Puffer:
This little guy you will want to keep without any other fish (they are aggressive) and will need a little bit more research, but they are just so fantastic! They are completely freshwater (not saltwater), and just full of personality! They are carnivorous though, like the betta, so you'll want to make sure they get a proper diet.
Paradise fish:
A close relative of bettas and gouramis, this species really is aggressive, and should be kept alone. But boy, are they pretty (and super easy to keep)! The basically have the same requirements as a betta, and are a labyrinth breather as well as it cousin so again, filtration is optional. However, if you're keeping a fish without filtration, you'll still need to do bigger water changes.
Otos:
I mentioned these above, and they are a great small fish that actually will eat algae throughout their adult life, unlike plecos.
Shrimp:
Very cool, help maintain a tank by eating algea and, um, waste. Also, you can find them in many different colors (ghost and cherry are the most common. Cherry are a bright red!)
Plants:
Plants help make a tank easy to keep and beautify it, use up nitrates and other waste, give off oxygen into the water... so many reasons to plant you're tank. There are some aquatic plants out there that you literally place in your tank and forget about, and they'll grow for you very well. The best are anubias, java fern, and java moss. Other than that, look for low light plants, as these are usually very hardy (make sure to stay away from sword plants, they get very large). Make sure they are fully aquatic though, as non aquatic plants like bamboo will rot int the water. And small. Bad. (speaking of which, planting you're tank will reduce any fish tank small you have).