Is five gallon tank big enough for 3 goldfish?

It is nowhere near big enough. The basic rules of successfull fishkeeping are :- 1 inch of fish needs at least 1 gallon of water. (a Goldfish is a 10 inch fish). Every tank must have a permanently running cycled filter. :- Every tank must have at least 50% of its water replaced every week. So, if you do the sums right (3 x 10 gallons) you will see that in order to keep 3 goldfish sucessfully you will need at least 30 gallons of water.