The Church affirms that Scripture is inspired by the Holy Spirit but written through the means of human authors. While the human authors put in writing what God wanted preserved in Scripture, the human authors made use of the literary forms available to them; among these forms were historical, poetical and prophetical. Due attention must be paid to the social conventions of the time and these literary forms in interpreting and understanding what is written.
So, how do we interpret something like the creation account in Genesis? Even from the early years of the Church there were different interpretations. Some of the Church Fathers took the creation account in Genesis as literal and historical truth. Other Church Fathers was the account as a literary form common in the Middle East for explaining the relationship of the Divine and Human Beings. As a literary form it drew on stories common to the region and interpreted them for their spiritual meaning. It was their spiritual meaning that bore the weight of Divine inspiration while the more literal meaning was merely the literary form used.
Taking the creation account as an historical and scientific fact limits the interpretation of the account to a more literal traditional understanding that leaves little room for the findings of science. However, realizing that Genesis is not meant to be a scientific account of creation but a literary medium for important spiritual truths leaves the door wide open to science. It was this second approach that was taken my many of the Church Fathers in their teaching and interpretation of Scripture. We see this in the writings of Origin, Clement, Athanasius and many others. These two different approaches to understanding Scripture have remained in place and in a vital and healthy tension throughout the history of the Church.
Much of the scholarship of classic Greece and Rome was in danger of being lost in the West during the Dark Ages after the fall of Rome and through the end of the first millennium. It was the Church that preserved a good deal of the scholarship in its monastery libraries, as well as the classic methods of academic inquiry from the classic era, that morphed over time into the Scholastic method of the Middle Ages, which later became the fertile intellectual soil out of which the Scientific Method emerged.
It must be admitted that there were periods of history in which a more literalist interpretation of Scripture dominated. It was during these periods that some ideas and scientists suffered; Copernicus, Galileo, and Bruno among them. Yet, overall the Catholic Church has been a functional patron of the sciences. The Catholic universities of Europe were havens for mathematics and the sciences.
In more recent years, the Father of Genetics is Gregor Mendel, a Benedictine Monk. One of the formulators of the Big Bang Theory (the scientific theory, not the TV show) was Georges Lemaitre, a Jesuit priest. Among the world class paleontologists who provided evidence for the theory of evolution and helped map human evolution was another Jesuit, Pierre Teilhard de Chardin. Also, guess who owns and operates one of the leading astronomical observatories in the world; the Vatican!
The writings and public addresses of all the popes for the past fifty years or more accept a view of the operation of the world that is grounded in the discoveries of science. While the popes may voice warnings about the direction that certain technological developments might move humanity, these warnings are of a moral nature rather than a rejection of science.