By faith alone do we hold, and by no demonstration can it be proved, that the world did not always exist....The reason of this is that the newness of the world cannot be demonstrated on the part of the world itself. For the principle of demonstration is the essence of a thing. Now everything according to its species is abstracted from "here" and "now"; whence it is said that universals are everywhere and always. Hence it cannot be demonstrated that man, or heaven, or a stone were not always. Likewise neither can it be demonstrated on the part of the efficient cause, which acts by will. For the will of God cannot be investigated by reason, except as regards those things which God must will of necessity; and what He wills about creatures is not among these.... But the divine will can be manifested by revelation, on which faith rests. Hence that the world began to exist is an object of faith, but not of demonstration or science. And it is useful to consider this, lest anyone, presuming to demonstrate what is of faith, should bring forward reasons that are not cogent, so as to give occasion to unbelievers to laugh, thinking that on such grounds we believe things that are of faith.
In other words, there is a causal supposition on the basis of which we could hold that the universe never began, but has an infinite past: namely, if God caused it to be so. Therefore it is impossible to show that it is necessary for the world to have a beginning, and therefore to demonstrate that it did. This does not preclude, of course, probable arguments one way or another; but when we are considering divine omnipotence, probable arguments don't carry very much logical weight. So we can't demonstrate it by way of efficient cause. And since demonstrative knowledge is based on the universal natures of things, and such natures could tell us nothing about the history of things, we can't demonstrate it formally, i.e., by way of the nature of the world itself. We could have probable arguments here, although Aquinas doesn't in this passage consider this possibility. (I seem to remember a passage somewhere in which he does, and allows it, but I can't find it at the moment, so perhaps I'm misremembering.)
This contrasts sharply with the recently popular Kalam cosmological argument of William Lane Craig, which attempts to argue that it is impossible for the world always to have existed (i.e., an infinite past is impossible). He argues this on the basis of the claims (1) that an actual infinite is impossible and (2) that an infinite is not traversable. Aquinas does hold that an actual infinite is not naturally possible (this would not, however, preclude an actual infinite's being miraculously possible); but Aquinas denies that an infinite past is an actual infinite - cogently, I think, since it's a little obscure as to how an infinite past would be an actual infinite (rather than just actually infinite, which is not the same thing). He also agrees that an infinite cannot be traversed; but he denies that an infinite past requires that there have been an infinite traversed, because such an objection mistakenly operates on the supposition that an infinite past implies that there are days infinitely separated from each other. I confess I'm not wholly convinced by this last argument, because I'm not wholly convinced that this kind of objection needs to rely on such an assumption. Craig's argument seems to do so, however; and is therefore based on a false assumption about what an infinite past implies.
Thus Aquinas refutes the Kalam argument, if taken as a demonstration. (If we can have probable arguments for the newness of the world, however -- and it seems conceivable that we could -- the Kalam argument might be salvageable as a probable argument. By revelation we know, as Aquinas says, that the basic Kalam argument is sound; but using it as proof on the basis of revelation would beg the question.) Indeed, I think he provides the best arguments against it; most arguments against the Kalam argument are very silly, or miss the point, or are implausible. (Craig also introduces 'confirmations' of the argument from big bang cosmology; I tend to think such arguments are utterly silly, as are the responses to them, but I have an admittedly idiosyncratic view about this sort of thing, being singularly unimpressed by any attempt to finesse grand metaphysical views, whether theistic or atheistic, out of a few equations and background radiation.)