The equation ΔG = -RT ln K relates the value of Kp, not Kc, to the change in standard free energy for a reaction in the gas phase, why.
A second look at that question suggests that the point is that
in the gas phase you have to use the K
p for the reaction and not the K
c of the solution-phase reaction.
For example, you couldn't use the K
c value of H
2O + CO
2 <—> H
2CO
3 in water to calculate the free energy change of the gas phase reaction.
The 'why' goes from the fairly obvious to the fairly complex, depending on how much detail you want to include, but basically heat of hydration will affect the free energy of the reaction in solution.