Derivation of Newton's law of gravitation How did Newton get $F=\frac{Gm_1m_2}{r^2}$?
What is intuition behind it?
What kind of experiment or thought experiment can I do to derive this?
 A: I'd recommend you read Book III of the Principia by Newton. There he sets out a careful proof based on some methodological rules and observations about planetary and satellite orbit. You might also read Feynman's chapter 7 from book 1 of the Lectures on Physics. He gives a bit more of an intuitive characterization of what is going on in Newton's proposition IV in his proof of universal gravity. The rest of Newton's proof is straightforward.
A: The system of the Newton laws of movement and the law of gravity forms a whole.
The second law, $F = ma$ can be experimentally shown, if $F$ is measured by the deflection of a spring. Objects with several masses can be pushed horizontally at several forces and the relation verified.
If those objects are hanged by the spring, its deflection shows that there is a force upwards. But of course there is no acceleration in this case. In order to keep the universality of the second law, a force of gravity must be postulated, so that the net force is zero leading to zero acceleration.
On the other hand, apples falling from trees and planets orbiting around the sun are accelerated, and the dependency on the distance and masses can be verified. Again, if a force was not postulated, there would be accelerated movements without a force, violating the second law.
A: Henry Cavendish performed a wonderful experiement, in the year 1763, to calculate the precise value of Newton Gravitational Constant (G).
A summary of the experiment by Cavendish:
Cavendish experimented with a few highly dense and non-magnetic balls and a few wires.
A very heavy lead ball was placed in close proximity to very tiny lead balls. A thin wire was placed between the heavy ball and the tiny ball.
The entire setup was enclosed in a vacuum chamber and kept in observation for some time.
It was observed that the tiny ball moved towards the heavy ball, due to gravity only. (Magnetic pull was ruled out, as the materials used are not magnetic).
The movement of the tiny ball got tracked due to the twisting of the thin wire kept between the balls.
The value of G (universal gravitational constant) was calculated by using the known weights of the lead balls and the amount of twist noticed in the wire that was between the balls.
More information on the experiment by Cavendish:
https://www.pnas.org/content/113/36/9949#F3
