Gravitational potential energy is related to an object's height. The greater the height, the greater the gravitational potential energy. Therefore, the baseball has the greatest gravitational potential energy when it is at its maximum height in the air.