The Moon orbits around the Earth. Since its size does not appear to change, its distance stays about the same, and hence its orbit must be close to a circle. To keep the Moon moving in that circle--rather than wandering off--the Earth must exert a pull on the Moon, and Newton named that pulling force gravity.
Was that the same force which pulled all falling objects downward?
Supposedly, the above question occurred to Newton when he saw an apple falling from a tree. John Conduitt, Newton's assistant at the royal mint and husband of Newton's niece, had this to say about the event when he wrote about Newton's life:
........
If it was the same force, then a connection would exist between the way objects fell and the motion of the Moon around Earth, that is, its distance and orbital period. The orbital period we know--it is the lunar month, corrected for the motion of the Earth around the Sun, which also affects the length of time between one "new moon" and the next. The distance was first estimated in ancient Greece--see here and here.
To calculate the force of gravity on the Moon, one must also know how much weaker it was at the Moon's distance. Newton showed that if gravity at a distance R was proportional to 1/R2 (varied like the "inverse square of the distance"), then indeed the acceleration g measured at the Earth's surface would correctly predict the orbital period T of the Moon.
.....
"Interestingly, however, the proof which Newton published did not use calculus, but relied on intricate properties of ellipses and other conic sections. "
You can read the full article here, smart guy that Newton, too bad he was not a nice person.
http://www-istp.gsfc.nasa.gov/stargaze/Sgravity.htm