On the Origin of Gravity and the Laws of Newton