I just took care of this problem with one of my goldfish today and thought I would pop a quick note up about it. Some of you may have noticed your goldfish has trouble swimming downward on occasion and just pops right back to the surface like it is full of air. The worse cases end up floating belly-up. This is most often seen in fancy goldfish with compact, round bodies. Their organs are all tightly packed in that round body and sometimes air does get trapped in the intestines. This sounds funny that the fish cannot swim due to a fishy equivalent of a fart but it can kill the fish if it continues too long. Many times they work it out, but not always.
Their diets need to have more grain than protein to begin with and do not overfeed. When/if the air problem happens the best thing I have found to remedy this are green peas. Yep. Peas. I keep a bag of frozen peas handy for this. If you catch it early, you have a chance to get the fish back to its happy dumb goldfish self (I mean that with affection).
I run a few peas under water and work them in my hands to get them to thaw. Then I pop out the insides of the peas to feed to the fish. For some reason I have better luck discarding the outer coating. In the case of this fish, I had to grab him/her and hold the pea in front of his face until he calmed down and realized food was dangling in front of its mouth. Did not take long. This one is very food oriented. Sucked down 3 peas in no time (not a full grown fish-size of golf ball and looks like one too). I broke up more peas into the tank for the others to eat as well. After a few hours the fish was right side up and not struggling to swim down. Another one was having some floating problems too and it is better as well.
Other things to check is your water. The better the water, the less I see this happen too. I am going to do a water change tomorrow to be safe.
Some people also feed larger goldfish Cheerios cereal.
If the fish has been having this problem for days, the peas may not help. I am not sure what to do then other than do water changes.
Preventative: Try to feed sinking pellets, not floating. The fish may be sucking too much air when they try to get food floating on the surface. The goldfish will clean the food up off the bottom. They love their food. Man companies are switching to primarily sinking pellets now because of the floating problem.
Oh, and by the way, fish bowls are horrible for goldfish long term. Get an aquarium.
Hope this helps!
Let me know if anyone has more suggestions!