See also: Isaac Newton and General relativity
All things with mass or energy are brought toward one another. This includes planets, stars, galaxies and even light. On Earth, gravity gives weight to physical objects. The Moon's gravity causes the ocean tides. Gravity caused the original gaseous matter in the universe to coalesce and form into stars. Gravity then causes stars to group into galaxies. Thus, gravity is responsible for many of the large scale structures in the universe. Gravity has an infinity range. However, as objects get further away, its effects become increasingly weaker.
Gravity is accurately described by Albert Einstein's 1915 general theory of relativity. Physicists continue to work to solve Einstein's field equations, continuing to test the theory and finding agreement between theory and experiment in these cases.
This theory describes gravity not as a force, however, as a consequence of the curvature of spacetime. This curvature is caused by the uneven distribution of mass. The black hole is the most extreme example of this kind of spacetime curvature. Nothing, not even light, can escape the event horizon of the black hole.
Isaac Newton
For most applications, Newton's law of universal gravitation is applicable. Newton's law of universal gravitation says that there is an attractive force between two particles that is directly proportional to the product of their masses and inversely proportional to the square of the distance between their centers.
Gravity is the weakest of the four fundamental interactions. Gravity is about 10^38 times weaker than the strong interaction, 10^36 times weaker than the electromagnetic force and 10^29 times weaker than the weak interaction. Thus, Gravity has little influence on subatomic particles. However, at the macroscopic scale, gravity is the dominant force. Gravity is the cause of the formation, shape and trajectory of astronomical objects.
Ancient and earlier views
There were a wide range of ancient scholars to investigate the nature of gravity. Aristotle believed each of the elements had a natural place that they tended to as their end. The Earth was at the center of the universe, then water, air, then fire and lastly aether, concentric shells from inner to outer.
Plutarch, who came after Aristotle, claimed that gravity was not exclusive to Earth.
Archimedes also, though he did not consider gravity a force, taught that a triangle has a center of gravity.
De architectura was a work by Vitruvius, where he claims that gravity does not depend on the weight of an object, yet, on its nature.
Brahmagupta also, in 628 CE, proposed gravity is an attractive force that attracts bodies to the Earth.
Al-Biruni, who proposed that gravity was not unique to Earth, was contrasted with the view of Al-Khazini, that matter was attracted to the center of the Earth, the same view held by Aristotle.
Einstein
Newton's theory of gravitation could not explain the eccentricity of the orbit of the planet Mercury. There were efforts to find a body close to Mercury causing the disturbance, yet one was never found. Mercury's orbit could be accurately modeled with Einstein's theory of general relativity.
Einstein's contribution to the history of our understanding of gravity is two-fold:
Principle of relativity
Non-Euclidean geometry of Riemann
The principle of relativity was established by Galileo and was a fundamental principle for Newton.
Geometry was to be an ancient science that would break away from Euclidean limitations. This break occurred in 1800 when Carl Gauss discovered a metric could characterize a surface in any number of dimensions. The metric is the notion of distance between points. This was developed into a fuller geometry by Bernhard Riemann in 1854.