You're getting confused by the Kp = Kc * (RT)^n relation (n is the change in number of moles of gas per mole of the forward reaction equation that occurs) here?
I think the crucial point is that ΔG=-RT*ln(K) actually has K referring not to concentrations or partial pressures but to activities, and if Kp is expressed in terms of partial pressures (fugacities to be exact) then ΔG=-RT*ln(Kp) holds because fugacities are activities for gases (I think), whereas Kc is never exact but in solution is often approximated to be equal to K.