How to derive the Gibbs-Helmholtz equation?
You need to know that

$$\require{begingroup} \begingroup \newcommand{\d}[0]{\mathrm{d}} \d G = V\,\d p - S\,\d T$$

from which you can determine that

$$\newcommand{\pdiff}[3]{\left(\frac{\partial #1}{\partial #2}\right)_{\!#3}} \pdiff{G}{p}{T} = V \qquad \pdiff{G}{T}{p} = -S$$

Therefore (by the quotient rule)

$$\begin{align}\pdiff{}{T}{p}\left(\frac{G}{T}\right) &amp;= \frac{T(\partial G/\partial T)_p - G(\partial T/\partial T)_p}
{T^2} \\[8pt]
&amp;= \frac{T(-S) - G(1)}{T^2} \\[8pt]
&amp;= \frac{-TS-G}{T^2} \\[8pt]
&amp;= -\frac{H}{T^2}
\end{align}$$

as desired (since $G = H - TS$).