The principle was known long ago, to the Babylonians and Hellenistic Greeks but the accuracy of prediction depends on the detail of the Lunar motion (the motion of the Sun is relatively simple). Without a precise Lunar theory, it was possible to predict that an eclipse is
LIKELY to happen on such and such date and time, but not with a 100% certainty, and the place where it will be visible and other features could not be predicted.
Of course there were many cases when an eclipse was predicted and really happened,
see, for example http://en.wikipedia.org/wiki/Solar_eclipse_of_August_21,_1560
Another question is how far in advance one could predict. I suppose at the time of Brahe
it was possible to predict an eclipse several months in advance.
Let me give an example in 1598 the almanac gave a solar eclipse on March 7 and a lunar
eclipse with the error of one hour. This led Kepler to the discovery of the 4-th inequality (see below). An almanac is supposed to make predictions for one year.
Sufficiently precise Lunar theory
for accurate predictions for several years in advance,
with 100% certainty and where it will be visible, and other features of the eclipse,
was developed in the middle of 18 century, as a result of combined efforts of several greatest mathematicians of that time (Clairaut, Euler, T. Mayer).
But there are many records of more or less accurate predictions before that time, beginning from antiquity.
Remark 1. This is very different from the Lunar eclipses which do not require
knowledge of fine detail of the Moon motion. Prediction of the Lunar eclipses
was possible since antiquity.
Remark 2. The main motivation for these efforts was not the eclipse prediction but more important practical problem: determination of the longitude at sea by the "Method of Lunar distances". But almost at the same time, chronometer was invented, and for about 1/2 of a century the two methods were competing. When chronometers became affordable (in the first half of 19-th century, the method of Lunar distances gradually was displaced by a simpler method, based on a chronometer).
EDIT. Let me elaborate as much as possible without MathJax. First of all, what does it mean to "predict"?
If 10% of the Sun disc area is obscured, is this an eclipse or not?
This is what I mean by "features", full or not full, perhaps circular. The same eclipse will be full in one place and partial in another.
Second important question: predict how much in advance? 2 days? 2 months? 2 years? or 1000 years? This makes a great difference.
Now a brief account of what was involved. I assume that the Sun motion is known precisely
(it was known to sufficient accuracy to Hipparchus). So we only discuss the Moon. Both Sun and Moon have visible diameter about 1/2 degree. So to predict an eclipse at a given location and time we need to know the Moon motion, say to minutes of angle.
From the time of Hipparchus to this time, the (geocentric) coordinates of the Moon as functions of time are described by a series of the form $$At+E(t)+E'(t)+E''(t)+ \cdots$$
where $t$ is time, $A$ is the "mean motion" and $E$ s are periodic terms depending on the
mutual position of Sun and Moon. These periodic terms are called "inequalities".
The first inequality is due to Hipparchus and its maximal amplitude is about 6 degrees.
Second inequality (a. k. a. evection) was discovered by Ptolemy, its maximal
value is 2.5 degrees.
While the first inequality is due to ellipticity of the orbit (Kepler's law, as we know now), the second inequality is due to the influence of the Sun.
There was no much progress between Ptolemy and Tycho, except perhaps that some
numerical constants were determined more precisely. Astronomers before Tycho did not measure angles with sufficient precision. Their theories were based on Lunar eclipses,
not on the direct angle measurements.
It was Tycho Brahe who discovered the third inequality (a. k. a. variation) which can be as large as 40' (that is greater than the diameter of the sun or of the Moon).
Later Kepler and Brahe discovered the forth inequality (of amplitude 11').
At this point the development stopped, because already the second inequality cannot be explained by the Kepler laws (Kepler laws solve the 2 body problem, and here we have 3 bodies: the influence of the Sun is not negligible, as we see already from the second inequality). For example, Jupiter obeys Kepler's laws to very high accuracy, because the influence of other planets is negligible.
But Earth-Moon-Sun system is a real 3 body system, and Moon does not obey Kepler's laws with sufficient accuracy.
With Newton's Universal law of gravitation, the first and most important problem was
whether it gives anything new besides the Kepler Laws. (After all "explanation of the Kepler Laws was not such a great achievement because the Gravitation Law was derived from these very Kepler laws). The problem was to predict NEW phenomena, or at least (as a first step) to explain the third inequality.
It is known (nowadays) that the three body problem has no closed form solution.
This is a system of differential equations based on the law of gravity, but this system
cannot be exactly solved. So the major efforts of the best 18 century mathematicians were spent on finding a useful approximate solution. Some of them were stimulated with the practical of this problem which I mentioned above. After the great efforts
(the main contributors are Clairaut, Euler and Mayers, but also many others)
the theory permitted to compose lunar tables which predicted Moons position for several years in advance with the accuracy to fractions of a minute.
THIS was the decisive test of the law of gravitation. Another test, some times earlier was the correct prediction of the shape of the Earth, confirmed by precise measurements.
Mayers and Euler shared a part of the Longitude Prize given for the solution of the problem of
longitude by the British Parliament. (The main part of this prize was awarded to Harrison
who invented chronometer at approximately the same time). Nautical Almanac based on Mayers tables was published.
It gave predictions for one year.
I examined the early issues of the Almanac, and can say that the maximal error in Moon's
position was about 0.2'. But every year it had to be corrected.
Further mathematical achievements of 19-th century made possible very long term predictions
(say, 2000 years) with the accuracy within seconds.
Modern formula contains several THOUSAND periodic terms, "inequalities".
So we can easily tell that some eclipse happened on such and such date (say 1545 BC)
at such time, when such and such Babylonian king reigned, and the eclipse was 35% at
in a given city. This degree of accuracy of "predictions" was only made possible in 20-s century,
approximately since 1910.
The previous, very simplified discussion concerns only Moon's motion in longitude. The motion in latitude is even more important for the eclipse prediction, and it is described similarly. The key steps are due to Hipparchus (inclination of the orbit), Brahe (first inequality), Kepler (elliptic orbit), Newton (law of gravity), d'Alembert, Clairaut and Euler
(approximate solution of Newton's equations) and Mayer (making of the tables).
I should also mention that at the time of Hipparchus, there existed a different theory,
of Babylonian astronomers which had approximately the same accuracy and was based on different mathematics. This theory was practiced as late as 19-th century in India, by Tamil astronomers, and it gave good predictions of Lunar (not Solar!) eclipses.