A Lagrangian formulation for a gravitational analogue of the acoustic radiation force