According to Newton's Law of Universal Gravitation (NLUG),
m_1 * m_2
F = G * ---------
F is the force between the masses;
G is the gravitational constant (6.674×10^−11 N · (m/kg)^2);
m1 is the first mass (assume it is the earth)
m2 is the second mass (assume the alien's ship)
r is the distance between the centers of the masses.
The earth has a mass of 5.972×10^24 kg and a radius of 6,371 km. The Crust of the earth is the first 5 to 70 km of that radius, and 1% by volume, composed mostly of Oxygen (46.6%), Silicon (27.7%), Alumnium (8.1%), and Iron (5.0%). All the other elements in the crust make up the remaining 12.6%. Because Oxygen and Silicon are so prevalent, 60% of it is Feldspar, a group of rock-forming minerals.
So why does the geology of the earth really matter? I'll get to that in a bit.
NLUG would state that what happened in this film would not happen especially if it was designed to grab into the earth like a claw one of those claw arcade machines. (I would imagine Roland Emmerich will provide a much more scientifically closer to physics when he releases a future film he is working called Moonfall.) But the aliens are such hams because they could have just grabbed the nearest asteroid and been so much more effective at destroying the earth.
Let us assume that the mass of the space ship is much, much greater than the earth despite its size. That it was made out of heavier elements than the ones I mentioned, especially since Iron has the largest atomic number in that list (26) and the heaviest of the metals in than list of about 55.845 amu or 9.2732796×10^-26 kg.
I mean, if you really want to slam into the earth without obliterating it first, you would clearly need to manually slow down enough to avoid crashing into it. With the asteroid however, that is not an option. Once the asteroid hits earth, it is game over.
But the aliens appeared to be kind enough to want to save us from your standard ELE (Extinction Level Event) Asteroid. No, they wanted to really let us have it (as if they could win anyway because Hollywood likes that kind of ending).
So how would the aliens succesfully reverse gravity? They would need to create a mass much greater than the earth. They would also need to adjust the thickness of their ship to have a radius greater than or equal to the earth's. Basically, after crashing into earth, they would need to crash another space ship, and another space ship, and another space ship, and so on until things began falling up.
And as David Levinson (Jeff Goldblum) stated "what goes up, must come down", so to reverse the reversal and have stuff just crash back into earth, those other spaceships on top of that spaceship would need to quickly get off of that one.
In the end, for an alien race trying to show they are much more dominant than humans because of all the technology they created, they are pretty stupid. An all it would take is an asteroid crashing into the biggest mother ship they have. Let's hope that the humans engineer something like that in Independence Day 3 so we don't have to deal with them ever again!
If it was good enough for the aliens that attacked earth in Starship Troopers, it would be good enough for the humans in ID3.