@Aven: Le sigh. You need to do a 100% water change and drip acclimate the fish back to the water. My guess is its living in filthy water with sky high Ammonia/nitrates/nitrites. Save all the gravel, do not wash it out. Change the water, add the gravel, run the filter, and then add the fish back after drip acclimating said fish. Ditch the pH test, pH is generally moot unless you're keeping cichlids or delicate fish. My water pH from he sink is 8.4, once in the tank it dropped to 7.6 in one tank and 7.4 in the other tank.. /shrug. Anything can basically randomly change pH therefore pH is moot. xD Grab a API freshwater master test kit. Avoid the strips.. They are unreliable. Go with a liquid test kit always.
Is he a fancy or common? Fancies do fine in a 30ish gallon whereas commons need 55 gallons and up. x.x Storage totes are pretty cheap and work well as make-shift aquariums. Craigslist normally has great deals on 55 gallons. I saw a 55 gallon for $30 once, wasn't water tight but thats easy enough to fix. At least upgrade as much and as fast as you can if you guys are dead-set on owning the goldfish, otherwise seek out someone with a pond.

Drip method:
http://www.ratemyfishtank.com/articles/97 To keep from shocking the fish with clean water.
Do you know about cycling?
http://www.fishlore.com/NitrogenCycle.htm Just in case. =)