What helped Einstein to provide a more accurate description of gravity than Newton? Newton's explanation of gravity as an attractive force seems to have been superseded by Einstein's explanation of gravity as warping of space-time. Was there any advances in math and science that was not known in Newton's time, that would have laid the foundation for Einstein to give a more accurate description of gravity in General Relativity?
 A: In addition to all the answers listing the improved mathematical tools, I think it's important to mention the enormous progress made in astronomy, thanks to both the vastly improved manufacturing techniques that enabled telescopes far beyond anything possible in Newton's time (remember that Newton himself laid an important foundation in the then-new field by inventing the reflector telescope), and, well, the widespread use of Newtonian mechanics in developing celestial mechanics. The progress of astronomy gave an extremely important source of insight: the known problems that were encountered since Newton developed his theories. It's the kind of input that's only possible once you have your theory widely used and tested.
The perihelion shift of Mercury's orbit in particular was an important indication of success of the general relativity, being a well-known problem that both showed that classical gravity had shortcomings, and that the general relativity was on the right track in explaining it.
A: An understanding of electromagnetism was required for the development of Special Relativity, which then motivated General Relativity. Specifically, the construction of Maxwell's equations was needed. The second and third sentences of Einstein's 1905 paper "ON THE ELECTRODYNAMICS OF MOVING BODIES" are:

Take, for example, the reciprocal electrodynamic action of a magnet and a conductor. The observable phenomenon here depends only on the relative motion of the conductor and the magnet, whereas the customary view draws a sharp distinction between the two cases in which either the one or the other of these bodies is in motion.

As stated by Einstein himself, the incompatibility of Maxwell's equations with Newtonian mechanics was the motivation for Special Relativity, which was, in turn, the motivation for General Relativity.
It's interesting that we had to understand electromagnetism to understand gravity, but it's pretty clear that's what happened.
Newton died in 1727. The development of electromagnetism required an enormous amount of experimental and theoretical work that hadn't been done in the time of Newton. Furthermore, some improvements in Newton's and Leibniz's calculus were needed to represent Maxwell's equations. Here are some major developments in electrical theory:


*

*1733: Studies of static electricity led to the idea of two electrical fluids (resinous and vitreous fluids)

*1745: Leyden jar and the discovery of capacitance

*1748: Idea of a single electrical fluid and concept of negative and positive charges (Benjamin Franklin)

*1785: Inverse square law of charge interaction (Charles-Augustin de Coulomb)

*1813: Gauss's law relates an extended to charge distribution to its electric field

*1820s: Experiments of Hans Christian Ørsted, Michael Faraday, Humphrey Davy, and others establish that an electric current creates a magnetic field

*1820: Biot-Savart law describing the magnetic field produced by an electrical current

*1821: First demonstration of a rotary electromagetic motor by Michael Faraday

*1831: Discovery electric induction (that a moving magnetic field causes an electric field) by Faraday and Joseph Henry 

*1861: Maxwell adds the displacement current term to Ampère's law, completing Maxwell's equations

*1865: Weber finds a correlation between electromagnetism and the speed of light 

*1880s: Hertz transmits electromagnetic waves through air

*1887: Michelson and Morley experiments shows, with high precision, no evidence of drift in an electromagnetic medium (ether) as expected from Newton's laws

*1889: Oliver Heaviside demonstrates the first hint of length contraction in Maxwell's equations

*1889: FitzGerald specifies Lorentz–FitzGerald contraction

*1894: Marconi develops wireless telegraphy using electromagnetic (radio) waves

*1895: Lorentz force law

*1897–1904: Larmor and Cohn arrive at the concept of time dilation

*1905: Einstein publishes "ON THE ELECTRODYNAMICS OF MOVING BODIES"
The required experimental work also required a lot of industrial development. The availability of inexpensive interchangeable parts and cheap metal wire were undoubtedly major contributors in the growth of electrical technology and the study of electrical phenomena:
Quoting Wikipedia:

The metal screw did not become a common fastener until machine tools for their mass production were developed toward the end of the 18th century. This development blossomed in the 1760s and 1770s.

Furthermore, both Special Relativity and developments in mathematics were needed for General Relativity.


*

*1867: First developments of Riemannian geometry by Riemann

*1915: Einstein publishes his field equations (General Relativity)

A: *

*A well-developed idea of a field theory. Newton thought of the force of gravitation to be operating with an action-at-a-distance mechanism. While this bothered him, it remained an unresolved question to him. However, by the time of Einstein, the idea of thinking of the force of gravitation in terms of a field theory had been developed. 

*Lorentz invariance. While the shift from thinking of the theory of the force of gravitation in terms of a field theory was an important conceptual shift, nothing really changed in terms of the mathematical description of the force of gravitation. But, with the development of special relativity, Einstein had realized that the laws of physics should be Lorentz invariant, unlike the Newtonian law of gravitation which was Galilean invariant. 

*Mass-energy equivalence. This is another aspect of the development of special relativity which was relevant to going beyond the Newtonian law of gravitation. Einstein had realized through special relativity that mass and energy are not distinct properties but are rather unified in a profound way. This led him to believe that if mass plays a role in causing gravitational attraction then so should energy. However, as I said, this is closely related to my previous point: Lorentz invariance. 

*Riemannian geometry. Putting together all the physical axioms that Einstein had developed crucially required the use of Riemannian geometry. In fact, learning the tools of Riemannian geometry was the hardest part for Einstein in his journey of developing his theory of gravity. 



Finally, I would like to mention that two crucial elements that went into the development of general relativity (perhaps, the most crucial two elements) were already present at the time of Newton. One of them was the equality of the inertial and the gravitational mass (something that Newton also found curious) and the other was the question of what determines which frame is an inertial frame (to which, Einstein ultimately found the answer: the freely falling frame is the inertial frame).  This is not to say that Newton should've developed general relativity had he been clever enough. Lorentz invariance and non-Euclidean geometry were absolutely indispensable in the development of general relativity and they were too way ahead in the future to be discovered at the time of Newton.  
A: Special Relativity was the strongest input for Einstein.  Spacetime and its 4D metric was needed.  There was no notion of Lorentz transformations and invariance in Newton's time.  An invariant light velocity would have been absurd for Newton!
A: Riemannian geometry, the mathematical basis for General Relativity, was unknown in Newton’s day. The only geometry available to Newton was Euclidean geometry.
