After the Hammerhead pushes one Star Destroyer into another, the nose of the second Star Destroyer appears to start tipping then falling towards the Shield Gate which then destroys the gate after impacting. What causes the large pieces of debris to fall, or be pulled, towards the Shield Gate rather than being ejected outwards/away from the Hammerhead?
According to the novelization, it was indeed the planet's gravity (emphasis mine):
The Lightmaker [Hammerhead corvette] picked up speed as it approached the fray, pulled by Scarif's gravity as it pushed with its engines toward the disabled Destroyer. The second Star Destroyer seemed to realize what was happening, but much too late; caged by Red and Gold Squadron fighters, it could go nowhere in time to escape its fate.
The disabled Star Destroyer drifted toward its caged twin. Oquoné's course had been set with precision. As the Alliance starfighters broke away, the two Destroyers collided. Both ships flared with destructive power, and both tumbled more swiftly as Scarif's gravity gripped them. Locked together by cataclysmic devastation, their entwined wreckage plummeted toward the inner ring of the orbital gate station.
Rogue One: A Star Wars Story - Official Novelization Chapter 20
It appears as though the impact from the Lightmaker's collision was enough to push the Star Destroyers beyond the point where their engines could counteract Scarif's gravitational force.