S in that equation is the system entropy. There is also the entropy of the surroundings. The entropy change in the surroundings is -qrev/T, and since the reversible heat at constant pressure equals the enthalpy change Delta H, DeltaH = -T DeltaSsurr. So DeltaG = -T(Ssurr+Ssys)
DeltaG = -T(Ssurr+Ssys)