would just like to add,
temperature also plays a part in the amount of oxygen in the water.. the cooler the water, the higher the level of oxygen absorption.
as goldfish are generally recommended to be kept in 'coldwater' temperatures, the oxygen levels there are much higher when compared to warmer waters. however, goldfishes also require more oxygen as they are a 'coldwater' fish. with this in mind, it is not recommended to keep goldfish in too warm a tank unless it is very lightly stocked as the oxygen levels may be insufficient. (very few fishes in an appropriately sized tank)
also, to expand on OrionGirl's comments, i have read that a bubble of air would only allow approx. 2% oxygen exchange every meter of height in the water.. so you can imagine the amount the difference between surface agitation and airpump bubbles in terms of aeration efficiency!
lastly, live plants if kept in good conditions and are growing healthily, will release a good amount of oxygen into the water during the day during photosynthesis (they do take some back as plants respire as well). however at night, sufficient aeration (air pump or surface agitation) must still be provided as plants continue to respirate but stop photosynthesis resulting in an increase in CO2 in the water.
i hope this helps and is not too confusing...