Most likely, the first chemical reactions you studied in school moved in one direction; for example, vinegar poured into baking soda to make a "volcano." In reality, most reactions should be illustrated with an arrow pointing in each direction, meaning the reaction could go both ways. Ascertaining the Gibbs free energy of a system offers a way to determine whether one arrow is much larger than the other; i.e., does the reaction almost always go in one direction, or are they are both close to the same size? In the latter case, the reaction is just as likely to go one way as the other. The three critical factors in calculating the Gibbs free energy are enthalpy, entropy, and temperature.
Enthalpy is a measure of how much energy is contained in a system. A primary component of enthalpy is internal energy, or the energy from the random movement of molecules. Enthalpy is neither the potential energy of molecular bonds nor the kinetic energy of a moving system. The molecules in a solid move much less than those of a gas, so the solid has less enthalpy. The other factors in calculating enthalpy are the pressure and volume of the system, which are most important in a gas system. Enthalphy is changed when you do work on a system, or if you add or subtract heat and/or matter.
You can think of entropy as a measure of the thermal energy of a system or as a measure of the disorder of the system. To see how the two are related, think about a glass of water that freezes. When you take heat energy away from the water, the molecules that were moving freely and randomly become locked in a solid and very ordered ice crystal. In this case, the change in entropy for the system was negative; it became less disordered. At the level of the universe, entropy is always increasing.
Relationship to Temperature
Enthalpy and entropy are influenced by temperature. If you add heat to the system you will increase both entropy and enthalpy. Temperature is also included as an independent factor in calculating Gibbs free energy. You calculate the change in the Gibbs free energy by multiplying the temperature by the change in entropy, and subtracting the product from the change in enthalpy for the system. From this, you can see that temperature can dramatically change the Gibbs free energy.
Relevance in Chemical Reactions
Being able to calculate the Gibbs free energy is important because you can use it to determine how likely a reaction is to occur. Negative enthalpy and positive entropy favor a reaction going forward. Positive enthalpy and negative entropy do not favor a reaction going forward; these reactions will go in the reverse direction, regardless of temperature. When one factor favors the reaction and the other does not, temperature determines which direction the reaction will go. If the change in Gibbs free energy is negative, the reaction will go forward; if it is positive, it will go in reverse. When it is zero, the reaction is at equilibrium.