The goldfish could have a blockage or bloat. It could also be a tumor, or could be the results of long term exposure to high nitrates, which causes all sorts of systematic failures. The main thing is to feed a quality pellet food as your main food, feed lightly and keep up on your water...