Someone else had the same questions like you and went into a lot of effort to explain the differences:
Jeffrey Friedl's Blog » The Voodoo of Elevation Gain and Strava (and How I Get Around It)
TL;DR: Strava's iPhone app has access to both iPhone altimeters (barometric and GPS/GLONASS), but in the end it uses neither. Rather, it throws away that elevation data and instead relies on its own database of elevation data