(I, 1, 2), St. Thomas addresses this very subject, asking the question, "is sacred doctrine (theology) a science?"
Thomas uses a broader definition of science than is used today. By science, he refers to a disciplined study of a subject using rational processes, whereas modern science implies study of the natural world, and uses more specific methods such as experimentation. For example, Thomas includes among the sciences mathematics, geometry, and music. Therefore, I do not maintain that Aquinas makes a case for theology being a science in the modern sense, but that he does make the case that it is a rational discipline. Even so, in my post, I will compare theology to examples from modern science because modern science is widely accepted today as a rational discipline.
St. Thomas begins his argument in the body of article 2 by pointing out there are two kinds of sciences practiced in his day. Those that begin from first principles known "by the natural light of intelligence," and those that build on principles given by "higher" sciences. Examples of the first kind of science are mathematics and geometry. Mathematicians and geometers in Thomas' day did not base their work on the results of any other discipline, but began with definitions and principles obvious and agreeable to all. Deductive reasoning would then be used to derive knowledge based on these principles. Today's study of Euclidian geometry, which is commonly taught in High School, follows the same pattern. The geometry student begins with definitions and postulates that can be agreed upon based on common sense. Then deductive reasoning is used to prove theorems based on the definitions and postulates. The same process is used to prove more theorems based on previously proved theorems. Using this process, an elaborate set of theorems can be produced.
The second kind of science that Thomas describes begins with knowledge gained from a "higher" science. By "higher", Thomas means a science that is closer to first principles. For example, the study of perspective in art began in the Middle Ages, and it made use of knowledge gained from the study of geometry. However, an artist did not have to start at the first principles of geometry and derive theorems about parallel lines before he could use them in his painting. Instead, he could take the results of the work of the geometer as his starting point. Similarly, a person building a pipe organ does not have to derive methods of manipulating ratios in order to determine the length of his pipes. He can make use of the methods developed by mathematicians.
We see this kind of layering of knowledge much more today because the body of knowledge is so much greater now than it was then. Physics makes use of mathematics; chemistry uses physics; biology uses chemistry; and medicine uses biology. A doctor does not start at the first principles of mathematics and work his way up to cancer treatment. He surely had some math and physics as an undergrad, but soon put much more focus on chemistry and biology in his education. In his day-to-day practice, he doesn't do the work of a chemist, but makes use of the work of chemists in the medications he prescribes.
So, St. Thomas says that theology is like the second kind of these sciences, except that rather than being based on the results of another human science, it is based on divine revelation. In other words, God provides the basic body of knowledge that the theologian works with, and then the theologian uses rational thought processes to work with that "data". A good theologian carefully examines the sources of revelation to make sure he has access to true revelation, and that it has been acurately received, passed along or recorded. He then must use rational methods of interpretation, including maintaining consistancy with other sources of revelation, in order to apply the meaning of it to a given situation.
Theology is very similar to other fields of study. It resembles fields in the humanities such as philosophy, history, anthropology, and psychology more than fields such as physics and chemistry because the subject of theology is a divine person, and the humanities deal with people where "hard sciences" like physics deal with things that can be experimented upon.
Now the crux for theology, then, is divine revelation. If there is not a God, then there can be no divine revelation, so that would invalidate the data on which theology is based. If there is a God, and he has revealed himself in the sources that theology studies, then it is just as sound of a study as any other. Indeed, it is the highest field of study because it concerns the highest subject: the Creator of the Universe. All other fields deal with things in the creation, rather than the Creator.
Here is an analogy. Lets say that an astronomer using a radio telescope picks up signals that he believes are coming from broadcasts from another planet around a star many light years away. He teams up with a linguist and other experts to decode and interpret the signals. If he is wrong, and he is only picking up radiation from some natural source, than he and his colleagues are wasting their time. However, if he is right, and he has found the communications of other intelligent life in the galaxy, he is doing some of the most important scientific work on the planet. Either way, his work is rational. There is nothing irrational about the possibility of intelligent life elsewhere in the galaxy, and he is using completely rational methods in his study.
Although there are atheists who think they have explained everything, and there is no need for God, their explanations do nothing to eliminate the possibility of God. And since most humans who have ever lived believe there is a God, and many claim to have heard from God in some form or another, then it is not unreasonable to study these claims. This is the conclusion I came to at age 16, and within a year, I had found convincing reasons to believe the Bible is a record of divine revelation. From there I learned about Jesus Christ as the Word of God who taking on human flesh and living and dying 2000 years ago gave us the fullness of divine revelation. It took over 25 more years of experience and study to come to understand the important and unique role the Catholic Church has in transmitting and interpretting the revelation that came through Christ. So, I'm really just a beginner in Theology. Although I've learned a lot in the last 30 years, I feel like most of my time has been spent on the front steps of the Cathedral, and I've only recently walked through the doors and have begun to admire the beautiful artwork that covers the walls and ceiling.