GPS elevation is less accurate than GPS lat/lon for mathematical reasons. There's really no way around that. Barometric altitude is much better as long as the barometer is calibrated properly. Many bike computers automatically calibrate their barometers from GPS at the start of a ride, some do it continuously to addresses barometer drift.
Modern GPS units do a pretty good job with GPS altitude. It's rare in my experience for it to be off by more than 50 feet with a good lock.