The Gibbs free energy is the maximum amount of non-expansion work that can be extracted from a closed system; this maximum can be attained only in a completely reversible process. This maximum work is equal to $H-TS$. What kind of energy is this $TS$ energy? From where does it come if it is not from the internal energy of the system?
So the internal energy $U$ of a system is subject to a thermodynamic relation which looks like $$dU = T~dS-P~dV+\sum_i\mu_i~dN_i$$where $T$ is the temperature, $S$ is the entropy, $P$ is the pressure, $V$ is the volume, $N_i$ are the number of atoms of various species $i$, and $\mu_i$ are their chemical potentials. You can view this as a definition of temperature, pressure, and chemical potential. The symbol $d$, if you have never seen it before, comes from the word "difference" and means "a really tiny change in," so the equation reads, "a really tiny change in internal energy is equal to the temperature times a really tiny change in entropy minus..."
Now this is great if entropy, volume, and the numbers of particles are fixed: it forces the internal energy to stay fixed as well. But what if, say, heat energy can flow into or out of the system? If the system is in good thermal contact with an "environment" that maintains temperature $T$, then it will "borrow energy" from that environment until the temperatures equal each other. It's the same if volume is not fixed: it will "borrow volume" from the environment until the pressures equal each other.
The mathematical trick that we play here is called a "Legendre transform" and amounts to observing that $d(TS) = S~dT + T~dS:$ by subtracting an appropriate quantity from the internal energy $U$ we can produce a relation which again does not vary. For the Gibbs free energy $G = U + PV - TS,$ the relation becomes:$$dG = V~dP - S~dT + \sum_i \mu_i~dN_i,$$and we use it when the system is in contact with an environment with which it doesn't share particles, but does share volume and heat flows. If the pressure, temperature, and particles remain constant, then the Gibbs free energy remains constant even if the internal energy changes. Maybe, say, you've got a constant pressure on a gas condensing into a liquid at its boiling temperature: the internal energy is probably changing, but the Gibbs free energy is not.
If there is a Gibbs-energy change which doesn't come from or go into the internal energy U, then it is coming from or going into the environment that the system is connected with, either in the form of volume expansion or in the form of added entropy.