For a simple reaction, we can derive the free energy change as
$$\Delta G (T,P)=\Delta G^\circ(T)+k_\mathrm{B}T\ln K_\text{eq}$$$$\Delta G (T,p)=\Delta G^\circ(T)+k_\mathrm{B}T\ln K_\text{eq}$$
Here, $\Delta G (T,P)$$\Delta G (T,p)$ is the free energy change of the reaction, $\Delta G^\circ (T)$ is the free energy change at that temperature but 1 bar pressure or you can use any scale of absolute pressure as long as you are using $K_\text{eq}$ expression correctly. Now $K_\text{eq}$ can be expressed as (for a simple $\ce{A} \to \ce{C}$$\ce{A <=> C}$ reaction; here $P_\mathrm{A}$$p_\ce{A}$ and $P_\mathrm{C}$$p_\ce{C}$ are partial pressures of $\ce{A}$ and $\ce{C}$)
$$K_\text{eq}=\frac{P_\mathrm{C}}{P_\mathrm{A}}$$$$K_\text{eq}=\frac{p_\ce{C}}{p_\ce{A}}$$
So, at equilibrium $\Delta G(T,P)=0$$\Delta G(T,p)=0$ yields
$$K_\text{eq}=\exp\left[-\frac{\Delta G^\circ(T)}{k_\mathrm{B}T}\right]$$
So far everything is fine and also the effect of temperature, pressure on equilibrium has been explained nicely in the above answer but still the question is why $Q$ goes to $K$ at equilibrium is unexplained.
At any particular temperature $\Delta G(T,P)$$\Delta G(T,p)$ would be zero if and only if ratio of $P_\mathrm{C}/P_\mathrm{A}$$p_\ce{C}/p_\ce{A}$ is such that value of $\Delta G^\circ(T)$ is cancelled out by $k_\mathrm{B}T\ln K_\text{eq}$ or in mathematical term
$$\Delta G^\circ(T)=-k_\mathrm{B}T\ln K_\text{eq}$$
So it's a single point on thermodynamic surface. Now if you change one pressure the other pressure must change itself to keep the ratio constant. On the hand if you change temperature your pressure ratio will also change to keep $\Delta G(T,P)$$\Delta G(T,p)$ zero.
Now the final question is, why is $\Delta G(T,P)$$\Delta G(T,p)$ is zero at equilibrium. This is something like gravitational surface. In gravitational surface every object will try to go as down as possible to make it's center of mass as close as possible to the gravitational field. On a macroscopic scale it can be seen as equilibriation of chemical potential. If you keep two different temperature body together they will exchange heat between each other and eventually end up being at the same temperature. In the same way if you mix two chemical compound they will try to exchange chemical potential between themselves (The currency here is conversion of one molecule into another) as long as their chemical potential is not equal. The above formulation can be written as
For $\ce{A}$, chemical potential is
$$\mu_\mathrm{A} (T,P)=\mu_\mathrm{A}^\circ(T)+k_\mathrm{B}T\ln\frac{P_\mathrm{A}}{p^\circ}$$$$\mu_\ce{A} (T,p)=\mu_\ce{A}^\circ(T)+k_\mathrm{B}T\ln\frac{p_\ce{A}}{p^\circ}$$
similarly for $\ce{C}$
$$\mu_\mathrm{C} (T,P)=\mu_\mathrm{C}^0(T)+k_\mathrm{B}T\ln \frac{P_\mathrm{C}}{p^\circ}$$$$\mu_\ce{C} (T,p)=\mu_\ce{C}^\circ(T)+k_\mathrm{B}T\ln\frac{p_\ce{C}}{p^\circ}$$
At equilibrium
$$\mu_\mathrm{A}(T,P)=\mu_\mathrm{C}(T,P)$$$$\mu_\mathrm{A}(T,p)=\mu_\mathrm{C}(T,p)$$
And you will get
$$K_\text{eq}= \exp\left[-\frac{\Delta G^\circ(T)}{k_\mathrm{B}T}\right]$$
I hope it will help you to clarify the concept.