Was Newton aware of the fact that his theory of gravity did not account for the motion of Mercury?
Mercury deviates from the precession predicted from these Newtonian effects. This anomalous rate of precession of the perihelion of Mercury's orbit was first recognized in 1859 as a problem in celestial mechanics, by Urbain Le Verrier.
Newton probably believed that his theory is correct and exact. He could not know of the very small anomaly of Mercury.
But there were some much more serous problems. Gravity law and the laws of motion only give a law (a differential equation) of motion.
The ultimate test of the theory would be solving this equation and comparing the result with observations. But the equation can be explicitly solved only for the two-bodies case.
When solving for two bodies (Sun and a planet, or a planet and a satellite) one neglects the influence of all other bodies.
The most conspicuous system which is not adequately described by the two body equation is Sun-Earth-Moon. Newton worked very hard to explain the observed motion of the Moon by his gravitation theory but could explain only some gross features. (Technically: the so-called second inequality, but not the third).
This mathematical problem (to explain the visible motion of the Moon on the basis of the law of gravity) occupied many best mathematicians of XVIII century, and some serious doubts in the law of gravitation were expressed.
Finally a solution which predicts the motion of the Moon with sufficient precision (sufficient for the needs of navigation) was achieved in the second half of XVIII century. (And two people, Tobias Mayer and Leonard Euler got their share in the Longitude Prize:-)
This was one of the first great successes of Newton's theory of gravitation, but it happened long after his death.
The next great success came when the orbits of small planets were computed, and the most famous achievement: the discovery of a new planet (Neptune) from the perturbations its gravity causes to Uranus's orbit. Only at that point all doubts disappeared and one could say that the gravity law was firmly established.
Another great test was the shape of the Earth. Newton's gave a rough, essentially qualitative prediction. It was verified by very precise measurements in XVIII century. But a complete solution of the related equation (equation of equilibrium of rotated fluid) was not achieved until 20th century.