M.B.
2 goldfish in a 5 gallon tank is a recipe for disaster. Depending on the type of goldfish, 1 goldfish may need 20 gallons.
Goldfish are BIG waste producers.... a filter does little to remove the ammonia... only a properly cycled tank can do that (bacteria convert the ammonia to nitrites, another bacteria convert the nitrites to nitrates, and people have to remove the nitrates through frequent water changes).
When they tell you the "basic rule" of 1" of fish per gallon of water, they are meaning the ADULT size of the fish... not the tiny goldfish you see in the stores... and some goldfish can get to be 12" or more in length in a good environment.
I'm glad you have the routine of cleaning the tank every other day, but essentially 2 goldfish in a tank that small is like they are living in a toilet, since the water gets quickly polluted with ammonia, as you've seen.