Why is $\Delta G = -T \Delta S_{\mathrm{total}}$ valid only at constant pressure?
You have actually assumed in your equations that both pressure and temperature are constant. Firstly, we have that

$$\mathrm{d}S_\text{total} = \mathrm{d}S_\text{system} + \mathrm{d}S_\text{surroundings}.$$

By definition, differential of entropy is

$$\mathrm{d}S = \frac{\delta q_\text{rev}}{T}.$$

From the first law of thermodynamics, and the definition of entalphy, for a reversible process

$$\mathrm{d}H = \mathrm{d}U + P\mathrm{d}V + V\mathrm{d}P= \delta q_\text{rev} + \delta w + P\mathrm{d}V + V\mathrm{d}P.$$

When all work done is to expand, then $\delta w = -PdV$, and thus

$$\mathrm{d}H = \delta q_\text{rev} -P\mathrm{d}V+ P\mathrm{d}V + V\mathrm{d}P = \delta q_\text{rev} + V\mathrm{d}P.$$

Only if pressure is constant, do we get the relationship

$$\mathrm{d}H \overset{\mathrm{d}P=0}{=} \delta q_\text{rev} \to \mathrm{d}S = \frac{\mathrm{d} H}{T}.$$

Therefore,

$$\mathrm{d}S_\text{total} = \mathrm{d}S_\text{system} - \frac{\mathrm{d} H}{T}\tag{constant pres., exp. work}.$$

Additionally for constant temperature, or $\mathrm{d}T = 0$,

$$\mathrm{d}G = \mathrm{d}H - S_\text{system}\mathrm{d}T - T\mathrm{d}S_\text{system} \overset{\mathrm{d}T = 0}{=} \mathrm{d}H - T\mathrm{d}S_\text{system}.\tag{constant temp.}$$

Hence the result $$\mathrm{d}G = -T\mathrm{d}S_\text{total}$$ is true when pressure and temperature are constant (in addition to possible other constraints).



It is probably not the best practice on my part to write things like

$$\mathrm{d}H = \delta q_\text{rev} $$

which has the impression of sloppy (but probably not wrong) notation. Interpret this as that, given our assumptions, the number $1$ becomes an integrating factor for $\delta q$, equivalent to the inexact differential becoming exact under special conditions.

A better option might be to write this expression with definite integrals, i.e., 

$$\int_{\text{state 1}}^{\text{state 2}} \delta q_\text{rev} = \int_{H_1}^{H_2}\mathrm{d}H.$$