Your 'speed' on a trainer or stationary bike is only an estimate. Your real-world speed doesn't only depend on your power output, but your size, aerodynamicness, gear, and terrain.
Stationary bikes that are found in a typical gym are not calibrated for typical roadies, and thus are notoriously unreliable for speed and power estimates. You can be off by 30% or more (for real) so I wouldn't read too much into translation to road.
Even the 'road calibrated' dedicated bike trainers such as Kurt Kinetic and Cycleops, which are supposed to mimic road acceleration on a flat road extremely well, are only an estimate. If you're about 140lbs and lucky, you might fit the profile so well that it works 99% well (someone posted powertap data that showed such a similar fit). But if you're 250 lbs and bulky, you will likely be surprised with how off that so-called estimate is when you hit the real road.
I know from direct measurements of speed on flats that for ME, my trainer data (cycleops2) correlates very well with my outdoor flat time-trial speed. In fact, I use this data to target my time-trial speed for a flat 40k course on the road - if I'm doing 23mph x 60min on the trainer, I know I'll be able to do that outdoors, and likely another 0.5 mph average.
I've conversely been on several gym bikes that I've done similar efforts and seen 16mph, and 30mph for pretty much the same effort.