The force of gravity between any two objects depends on both objects' masses and their distance apart. The larger the mass of an object, the greater the force of gravity it exerts on other objects. However, the force of gravity between two objects also depends on the distance between them, with the force decreasing rapidly as the distance between the objects increases. So, while the force of gravity is influenced by the masses of both objects, the distance between them is also a critical factor.