Hydrogels favor moisture retention in the substrate and can attenuate the effects of salt stress on the production of potted plants. In this context, this research sought to evaluate the use of hydrogel to mitigate the damage caused by the salinity of irrigation water on the emergence, growth, and thermal index of Tagetes patula L. seedlings. The research was carried out in a greenhouse, in September 2020, in the municipality of Fortaleza, Ceará State, Brazil. The design used was randomized blocks in a split plot. The plots corresponded to seven levels of electrical conductivity of the irrigation water - ECw (0.5, 1.0, 2.0, 3.0, 4.0, 5.0, and 6.0 dS m-1) and the subplots corresponded to four hydrogel concentrations (0, 1.0, 2.0, and 3.0 g L-1), with five replicates and each subplot consisted of 27 seeds. The application of 3.0 g hydrogel L-1 of substrate favored the production of leaves and reduced the thermal index in plants associated with the increase in the salinity of the substrate up to 6.0 dS m-1. The use of 3.0 g L-1 hydrogel increases seedling height, leaf dry mass, and total dry mass compared to treatments without water-retaining polymer, even at moderate (2.0 to 3.0 dS m-1) and high (4.0 to 6.0 dS m-1) salinity levels, thus indicating a possible effect of mitigation of damage caused by the salinity of the irrigation water. However, the intensity of this mitigating effect decreases at higher levels of salt stress.