In reply to Kimono: The 500 and 800 units use barometric pressure but the 200 does not, the latter being less accurate. But none of them are perfect, but the ones that do use barometric pressure seem to be the most accurate. 500's are known to measure a bit under and 800's a bit over. As another poster says switching it on for a while before starting the ride does help. I live at about 100m altitude and I switch mine on it will take 5 minutes or so to move from 0-100 m elevation, so it's definitely doing something until it works out what the actual elevation is. You can program it with a spot height so it'll be right to start with, but it still needs to warm up for best accuracy.
As for phones, quite a few segments that have been set up from a ride that someone did with a phone have completely mad elevation profiles. Cat 3 and 4 ratings for something that is flat or goes downhill, or sudden height losses like you've ridden off a cliff. Although Garmins might get the total elevation a little out across a whole ride they are more consistent and you rarely see some of the major errors over a short period of time like you do with a phone. Although does happen occasionally. Once or twice it's plotted me riding out to sea.