Hydrogen atoms can enter into metallic materials through penetration and diffusion, leading to the degradation of the mechanical properties of the materials, and the application of hydrogen barrier coatings is an effective means to alleviate this problem. Zirconia coatings (ZrO2) have been widely studied as a common hydrogen barrier coating, but zirconia undergoes a crystalline transition with temperature change, which can lead to volumetric changes in the coating and thus cause problems such as cracking and peeling of the coating. In this work, ZrO2 coating was prepared on a Q235 matrix using a sol-gel method, while yttria-stabilized zirconia (YSZ) coatings with different contents of rare earth elements were prepared in order to alleviate a series of problems caused by the crystal form transformation of ZrO2. The coating performances were evaluated by the electrochemical hydrogen penetration test, pencil hardness test, scratch test, and high-temperature oxidation test. The results show that yttrium can improve the stability of the high-temperature phase of ZrO2, alleviating the cracking problem of the coating due to the volume change triggered by the crystalline transition; improve the consistency of the coating; and refine the grain size of the oxide. The performance of YSZ coating was strongly influenced by the yttria doping mass, and the coating with 10 wt% yttria doping had the best hydrogen barrier performance, the best antioxidant performance, and the largest adhesion. Compared with the matrix, the steady-state hydrogen current density of the YSZ coating decreased by 72.3%, the antioxidant performance was improved by 65.8%, and the ZrO2 coating hardness and adhesion levels were B and 4B, respectively, while YSZ coating hardness and adhesion were upgraded to 2H and 5B. With the further increase in yttrium doping mass, the hardness of the coating continued to improve, but the defects of the coating increased, resulting in a decrease in the hydrogen barrier performance, antioxidant performance, and adhesion. In this work, the various performances of ZrO2 coating were significantly improved by doping with the rare earth element, which provides a reference for further development and application of oxide coatings.