Gravity does not reverse an increase of entropy. If a ball rolls of a shelf, gravity will pull it down, converting potential energy into kinetic energy. If the ball hits a perfectly bouncy floor, it will bounce up to the same height as before. In thermodynamics this is considered reversible because there is no change in entropy. The ball will continue to bounce to the same height forever.
In order for the ball to stop bouncing, there must be some friction. In the process of friction, the ball shares its energy with the molecules of the floor. At the beginning we have an ordered situation where all the energy is in one body (the ball.) At the end the energy is shared between the many molecules of the floor. While things may look macroscopically more ordered because the ball is now steady, at the molecular scale the situation is actually more disordered. It's statistically very unlikely (impossible even) that the molecules of the floor, which now have the energy from the ball shared between them, would ever return all the energy to the ball so that it starts bouncing again. The stopping of the ball is an irreversible process, because entropy is increased. The increased energy of the molecules of the floor is noted as a tiny increase in temperature.
In summary, gravity pulls the ball down, but without friction it will bounce right up to where it was before. Friction can cause an apparent decrease in disorder at the macroscopic scale, but this is accompanied by an increase in disorder at the molecular scale.
(Note that I thave treated the ball here as if it was infinitely hard / a single molecule. In practice, any real ball will not be be perfectly hard and bouncy, so some of kinetic energy from the ball bouncing will also be absorbed by the ball itself, resulting in disordered movement of the molecules in the ball, thus increasing its temperature too.)
Similarly, if two planets collide, gravity can only make them coalesce because friction causes kinetic energy to be converted to thermal energy, with an increase in disorder at the molecular scale. Otherwise, the planets would bounce right off each other.
Two galaxies on a collision course might (if sparse enough) pass right through each other (gravitational interactions might cause some stars to deflect.) If they coalesce, it will be because the kinetic energy due to the velocity they had relative to each other is dissipated by friction - which means an increase in entropy.
Entropy is related to the number of degrees of freedom in the system. In the initial state, entropy is low because only the ball is moving, hence low degrees of freedom. In the final state, friction has spread the energy of the ball amongst the molecules of the floor,so the energy is shared between many degrees of freedom, hence higher entropy.