Nanostructured GdPO4 thermal barrier coatings (TBCs) were prepared by air plasma spraying, and their phase structure evolution and microstructure variation due to calcium–magnesium–alumina–silicate (CMAS) attack have been investigated. The chemical composition of the coating is close to that of the agglomerated particles used for thermal spraying. Nanozones with porous structure are embedded in the coating microstructure, with a percentage of ~30%. CMAS corrosion tests indicated that nanostructured GdPO4 coating is highly resistant to penetration by molten CMAS at 1250°C. Within 1 hour heat treatment duration, a continuous dense reaction layer forms on the coating surface, which are composed of P–Si apatite based on Ca2+xGd8−x(PO4)x(SiO4)6−xO2, anorthite and spinel phases. This layer provides effective prevention against CMAS further infiltration into the coating. Prolonged heat treatment densifies the reaction layer but does not change its phase composition.