Short answer: Gibbs free energy $G = U + PV - TS$ combines internal energy $U$, pressure $P$, volume $V$, temperature $T$, and entropy $S$ into a single quantity that measures spontaneity. With that I mean, that processes which lowerlowering the Gibbs free energy of your system will spontaneously occur, and equilibrium is reached when the Gibbs free energy reaches the lowest possible value.
Processes that increase the Gibbs free energy can be shown to decrease the entropy of the system plus its surroundings, and therefore will be prevented by the second law of thermodynamics. That's why it measures useful energy - your system may contain more energy, but entropy considerations will prevent you from spending it.