There is found a greater and a less degree of goodness, truth, nobility, and the like. But more or less are terms spoken of various things as they approach in diverse ways toward something that is the greatest, just as in the case of hotter (more hot) which approaches nearer the greatest heat. There exists therefore something that is the truest, and best, and most noble, and in consequence, the greatest being. For what are the greatest truths are the greatest beings, as is said in the Metaphysics Bk. II. 2. What moreover is the greatest in its way, in another way is the cause of all things of its own kind (or genus); thus fire, which is the greatest heat, is the cause of all heat, as is said in the same book (cf. Plato and Aristotle). Therefore there exists something that is the cause of the existence of all things and of the goodness and of every perfection whatsoever---and this we call God.
This proof, as St. Thomas makes clear, is originally from Plato. If we are able to evaluate one thing as better than another, Plato argues, this implies some absolute standard of goodness against which both can be measured. The relative implies the absolute quantity.
At first glance, this does not seem right. After all, the fact that we can measure a field and find it a furlong, does not imply that there is some being of maximum length against which we are measuring it. Any other entity of relative length—a yardstick, for example—will do.
But to grasp what St. Thomas and Plato and Aristotle are actually saying, I think, you need to grasp the idea of the ideal form (or, to use Aritotle’s term, the “category”). Plato is saying that in order to perceive some quality such as length, as distinct from a long object, and therefore to measure it, there must be an independently existing entity which is length itself, independent of all individual lengths. To perceive relative heats, we must be aware at some level of an absolute entity, heat itself.
Francis Bacon proposed that these things could actually be abstracted from the physical world itself, from repeated experience. This claim has, I think, been definitely exploded, in philosophical terms. Ideas cannot spontaneously generate themselves out of stones and stars. We start with the idea, and then test and measure the stones and stars against it (and it against them); this can even be shown to be true by practical experiment.
Now the quality of goodness or the quality of quality must itself have its pre-existing, eternal paradigm. That is God; by definition.