In Higgs mechanism, Higgs field, which likes syrup, slows down particles when they passing through. So it seems Higgs field gives particles inertial mass. But what gives particles gravitational mass? We know, particles can attract each other even when they are static.
Gravitational mass is a bit of a misnomer, because in General Relativity the spacetime curvature is determined (mostly) by the energy density. Mass is simply treated as equivalent to the amount of energy given by $E = mc^2$, or conversely energy is just treated as the equivalent amount of mass.
So the fact the particles are massless above the electroweak symmetry breaking energy and have a mass below it (acquired through the Higgs mechanism) makes no difference to gravity.