Galileo thought it was science, according to E. A. Burtt (The Metaphysical Foundations of Modern Science), who described Galileo's view in this way:
"God knows infinitely more propositions than we, but yet in the case of those that we understand so thoroughly as to perceive the necessity of them, i.e., the demonstrations of pure mathematics, our understanding equals the divine in objective certainty."
Burtt went on to say,
"It was this religious basis of his philosophy that made Galileo bold to declare that doubtful passages of scripture should be interpreted in the light of scientific discovery rather than the reverse. God has made the world an immutable mathematical system, permitting by the mathematical method an absolute certainty of scientific knowledge. The disagreements of theologians about the meaning of scripture are ample testimony to the fact that here no such certainty is possible. Is it not obvious then which should determine the true meaning of the other?"
He quotes from Galileo's Letter to the Grand Duchess (1615):
"Methinks that in the discussion of natural problems, we ought not to begin at the authority of places of scripture, but at sensible experiments and necessary demonstrations. For, from the Divine Word, the sacred scripture and nature did both alike proceed....Nature, being inexorable and immutable, and never passing the bounds of the laws assigned her,...I conceive that, concerning natural effects, that which either sensible experience sets before our eyes, or necessary demonstrations do prove unto us, ought not, upon any account, to be called into question, much less condemned upon the testimony of texts of scripture, which may, under their words, couch senses seemingly contrary thereto....Nor does God less admirably discover himself to us in Nature's actions, than in the Scripture's sacred dictions."
The question at all times and places is "Who is our final authority?" Galileo, as many before him and many after him have done, turned in the wrong direction.