Using the second law of information dynamics and the mass–energy–information equivalence principle, we show that gravitational attraction manifests as a requirement to reduce the information entropy of matter objects in space. This is another example of data compression and computational optimization in our universe, which supports the possibility of a simulated or computational universe. Here, we derive Newton’s gravitational force from information dynamics and show that gravity emerges as an entropic information force governed by the second law of infodynamics. This is fully aligned with Verlinde’s entropic gravity studies published in 2011 but is demonstrated here via a different approach.