Just my two cents worth! Of all GPS functions and capabilities, altitude is the least accurate. There are many reasons for this, but basically it resolves to parallax or geometric functions. The only time a GPS unit will give semi-usable altitude readings is when multiple satellites are locked and the signals are excellent. I own a total of 7 GPS receivers, and ALL of them will tell me that I'm climbing or descending when I haven't moved an inch! Even my IFR certified GPS will wander around, changing altitude readings when the airplane is parked at the gas pump!
As Walter said, GPS uses radio signals and a multitude of calculations to determine altitude. Our aviation system uses atmospheric pressure. I recently installed a blind altitude encoder in one of my airplanes and there was ONE calibration - the reference is set to 29.92" and that is the end of it. From that point forward it will report altitude according to the standards adopted by the FAA.
Depending upon atmospherics, GPS signal quality and local barometric pressure, you might "get lucky" and observe the GPS and your altimeter agreeing with each other, but it would be rare indeed!