Here's my most recent ride. I have an Edge 305 with barometric altimeter.
garmin tc reports 2830 ft gain (direct from the 305)
google earth reports 2773 feet gain (using imported .tcx)
ride with gps reports 2565 ft gain (using imported .tcx)
sporttracks reports 1031 ft gain (direct from the 305)