Your textbook's derivation is done under the assumption of constant $T$, which means $T_{sys} = T_{surr} =T$. However, this does not mean $dG_{sys}$ is always zero. Let's start with the following:
$$dS_{univ}=dS_{sys}+dS_{surr}= \frac{\text{đ}q_{rev, sys}}{T_{sys}}+\frac{\text{đ}q_{rev, surr}}{T_{surr}}$$
Since heat flow always affects the surroundings reversibly (the surroundings are in the limit of being infinitely large, and thus heat flow affects them only infinitesimally), the reversible heat flow into the surrondings equals the actual heat flow, which is the negative of the actual heat flow into the system. And since $T_{sys} = T_{surr} =T$, we have:
$$\frac{\text{đ}q_{rev, surr}}{T}=-\frac{\text{đ}q_{sys}}{T}$$
Which gives:
$$dS_{univ}=dS_{sys}+dS_{surr}= \frac{\text{đ}q_{rev, sys}}{T}+\frac{\text{đ}q_{rev, surr}}{T}=\frac{\text{đ}q_{rev, sys}}{T} -\frac{\text{đ}q_{sys}}{T}$$
Under the restrictions of constant $p$, and no non-$pV$ work,
$$\text{đ}q_{sys}=dH_{sys}$$
Hence:
$$dS_{univ}=\frac{\text{đ}q_{rev, sys}}{T} -\frac{dH_{sys}}{T} = dS_{sys} - \frac{dH_{sys}}{T},$$
which is what your textbook provides.
Note, however, that
$$\frac{dH_{sys}}{T} = \frac{\text{đ}q_{sys}}{T} \ne \frac{\text{đ}q_{rev,sys}}{T}=dS_{sys},$$
unless the process is reversible, i.e., non-spontaneous, in which case we could replace the "$\ne$" with "=", and $dG_{sys}$ would equal $0$.
This connects directly to the great beauty of using $\Delta G_{sys}$ at constant $T \text{ and } p$, when there is no non-$pV$ work: Under those conditions, $\Delta G_{sys} = -T \Delta S_{univ}$. I.e., under those conditions, we can use $\Delta G_{sys}$ (something we can calculate) as a surrogate $\Delta S_{univ}$, whose value is the criterion for spontaneity (and is something we typically can't calculate directly).
Here's how we get there:
If the system is at constant $T$:
$$\Delta G_{sys} = \Delta H_{sys} - T \Delta S_{sys}$$
That's because: $G=H-TS => dG = dH - d(TS) = dH -TdS -SdT$; at const $T, dG= dH -TdS $; note that a constant-$p$ restriction is not required to write this.
As we mentioned above, if we add the restrictions of constant $p$, and no non-$pV$ work, we obtain:
$$\Delta H_{sys} = -T \Delta S_{surr}$$
This in turn gives:
$$\Delta G_{sys} = -T \Delta S_{surr} - T \Delta S_{sys} = -T \Delta S_{univ}$$