The main difference between terrestrial planets and gas giants is their composition. Terrestrial planets, like Earth and Mars, are composed mainly of rocks and metals with solid surfaces. Gas giants, like Jupiter and Saturn, are composed mostly of gases like hydrogen and helium and do not have well-defined solid surfaces.