You *can* keep goldfish with tropical fish, but you need to be sensible.
As Curiosity101 says above, there is an issue with water temperature.* However, a great many tropical fish are actually subtropical fish, and will do much better at a relatively cool 18-22 degrees C that at the usual tropical temperature of 25 degrees C. Among these fish are danios, some of the Corydoras catfish, all Scleromystax catfish, variatus platies, and several barbs including rosy barbs and the green barb Barbus semifasciolatus, sometimes sold as Barbus schuberti.
Now, not all combinations work. Rosy barbs for example can be nippy, so they'd be a bad choice for use with fancy goldfish. Small danios are at risk of being eaten by big goldfish. You'd also need to watch water quality. Scleromystax barbatus for example is a stunning catfish that works great in big tanks with lots of water current, but if kept with goldfish, you'd want sufficient filtration that the goldfish don't overload the system.
Personally, I'd always recommend concentrating on keeping goldfish in decent sized groups of their own kind, with care being taken that compatible varieties were being kept. Standards (varieties with one tail, like comets and shubunkins) are best kept together and away from fancy goldfish. Only a few fancy goldfish (varieties with two tails) are sufficiently robust they mix well with standards, the fantail and the black moor being the obvious examples. Virtually all the other fancies are best kept in groups of their own variety: pompons, orandas, pearlscales, etc.
No goldfish aquarium should be smaller than 30 gallons, that being the minimum aquarium suitable for 2-3 adults. Any retailer telling you a smaller tank is viable is taking advantage of your ignorance. So in this regard, I agree strongly with Curiosity101 that goldfish deserve a fairly big tank. But in really big tanks with generous filtration rates (at least 6 times the volume of the tank in turnover per hour) you could keep standard goldfish just as you would large barbs or large characins, mixing them with catfish, weather loaches, etc. as you saw fit. A 55 gallon tank for example could house 3-4 standard goldfish and a school of Scleromystax barbatus without too many problems.
Cheers, Neale
*Some fancy goldfish actually prefer warm water, and the more delicate fancy goldfish are certainly harmed by cold, especially freezing, conditions, which is why they can't be kept in ponds. On the other hand, goldfish have established themselves as "pest" fish in many tropical countries, so it's questionable whether tropical temperatures cause them harm directly. But a warm aquarium will speed up their metabolic rate while reducing the oxygen in the water, causing problems for both the fish and the filter bacteria. If there's a reason not to keep goldfish at tropical temperatures, it's likely something to do with this rather than heat exhaustion or similar.