Gravitational potential energy depends on the mass of the object, acceleration because of gravity and the height of the object from a zero position, which is typically the ground or surface where the object is resting. This is because potential energy is the amount of energy stored in an object due to its position and represents the potential for a force, such as gravity, to do work on the object.
Work is defined as the change in energy on an object that occurs because of an applied force moving the object by a certain amount of distance. In gravitational potential energy, the applied force is the object's weight, given by the mass of the object and its gravitational acceleration, and the distance moved is given by the height.
Doubling the height of the object doubles the amount of potential energy it carries, as the force has to do more work to move the object by a greater distance. Doubling the object's weight also doubles the potential energy, as there is a greater amount of force and thus more energy required to move the object within the same distance. Typically, when the object is released, the potential energy is converted into kinetic, or moving, energy.