The condition for spontaneity is outlined by the Second Law of Thermodynamics, i.e.
$$\mathrm{d}S_\text{isol} > 0 \tag{1}$$
where the subscript isol indicates an isolated system.
A closed system and its surroundings necessarily comprise an isolated system (if either matter or energy leave the system, it must be to the surroundings, and vice versa. Therefore, together, the closed system and its surroundings are isolated.) The changes of entropy of the system and of the surroundings must therefore be positive:
$$\mathrm{d}S_\text{syst} + \mathrm{d}S_\text{surr} > 0 \tag{2}$$
Conventionally, the surroundings are taken to be an infinite heat reservoir, held at a constant temperature $T$. Furthermore, the system and surroundings are taken to be in thermal equilibrium, i.e. the system also has temperature $T$. Any heat transfer occurring from system to surroundings is therefore reversible. For example, if $\mathrm{d}n$ moles of a reactant decomposes exothermically, then the temperature of the system will be raised from $T$ to $T + \mathrm{d}T$, and heat is therefore transferred from the system to the surroundings. However, since the temperature gradient is infinitesimally small, the heat transfer is reversible.
From the point of view of the surroundings, which is chemically inert, the only thermodynamic process taking place is heat transfer, which is reversible. The entropy change of the surroundings is therefore given by the equality
$$\mathrm{d}S_\text{surr} = \frac{\mathrm{d}q_\text{surr}}{T} \tag{3}$$
Furthermore, any heat transferred out of the system must be transferred into the surroundings, and vice versa. Therefore,
$$\mathrm{d}q_\text{syst} = -\mathrm{d}q_\text{surr} \tag{4}$$
Combining equations $(2)$ through $(4)$, we can obtain
$$\mathrm{d}S_\text{syst} > \frac{\mathrm{d}q_\text{syst}}{T} \tag{5}$$
which should not really be surprising, since our system is undergoing a spontaneous chemical process.
At constant pressure, $\mathrm{d}q_\text{syst} = \mathrm{d}H_\text{syst}$. Therefore
$$
\begin{align}
\mathrm{d}S_\text{syst} > \frac{\mathrm{d}H_\text{syst}}{T} \tag{6} \\
\mathrm{d}H_\text{syst} - T\mathrm{d}S_\text{syst} < 0 \tag{7} \\
\mathrm{d}G_\text{syst} < 0 \tag{8}
\end{align}
$$
as desired. Note the imposition of the conditions of constant $T$ and $p$.
If $\mathrm{d}G_\text{syst} = 0$, then the system is at equilibrium. Whether any process with $\mathrm{d}G_\text{syst} = 0$ is considered "spontaneous", I am not entirely sure.