No, you do not need to remove a goldfish from the tank for the babies to survive. Goldfish are egg-layers, not livebearers. The eggs typically hatch within a few days, and the tiny fry require specialized food, stable temperature, and filtration during their first weeks of life.
If you do not want goldfish to breed, separate males and females during the spring and summer breeding season. Adding plants to the tank can also provide cover for fry and make it harder for adults to eat them.