I found discussion of eclipses in the g'mara, but not of the science of them. On Sukkah 29a the g'mara first discusses eclipses as omens (all bad). It then turns to causes:
The Sages taught that on account of four matters the sun is eclipsed: On account of a president of the court who dies and is not eulogized appropriately, and the eclipse is a type of eulogy by Heaven; on account of a betrothed young woman who screamed in the city that she was being raped and there was no one to rescue her; on account of homosexuality; and on account of two brothers whose blood was spilled as one.
And on account of four matters the heavenly lights are eclipsed: On account of forgers of a fraudulent document [pelaster] that is intended to discredit others; on account of testifiers of false testimony; on account of raisers of small domesticated animals in Eretz Yisrael in a settled area; and on account of choppers of good, fruit-producing trees.
According to Chazal, eclipses -- which are bad -- are punishment for certain transgressions. In other words, according to this g'mara they're divinely directed. That doesn't mean they didn't understand that this is accomplished by something moving in front of something else, but it suggests that they didn't know they could be predicted through science.