We report the strictest observational verification of CPT invariance in the photon sector, as a result of gamma-ray polarization measurement of distant gamma-ray bursts (GRBs), which are brightest stellar-size explosions in the universe. We detected the gamma-ray polarization of three GRBs with high significance, and the source distances may be constrained by a well-known luminosity indicator for GRBs. For the Lorentz- and CPT-violating dispersion relation E_{pm}^2=p^2 pm 2xi p^3/M_{Pl}, where pm denotes different circular polarization states of the photon, the parameter xi is constrained as |xi|<O(10^{-15}). Barring precise cancellation between quantum gravity effects and dark energy effects, the stringent limit on the CPT-violating effect leads to the expectation that quantum gravity presumably respects the CPT invariance.