@totebo is correct. There is no way to set gravity at runtime (yet). And even if it did, it would be applied to all objects. (Physics engines usually treat the gravity as a global force that is applied each frame)
As suggested, you are better off calculating this yourself.
Set the gravity to 0, and calculate a force to be applied for each object in the update function.