Thomas Aquinas spent the last twenty years of his life writing the famous Summa Theologica; a guide to the divine. The Summa included the quinque viae, the "five ways" by which the existence of god can be proved. A few months before his death, Aquinas stopped writing. When begged to continue he only said, "All that I have written seems as straw to me."
The Unmoved Mover:
Living in the 13th century (1225-1274), Aquinas could take advantage of the translations trickling out of Spain. The Toledo school were translating Aristotlean texts unkown in Christendom for centuries, along with sophisticated discussions of those texts by Muslim (and Jewish) philosophers. Philosophers like Averroes had rescued Aristotle from religion, proving that Aristotle did not contradict Islam, and that philosophy could lead to god by natural revelation.
Aquinas could use the rescued Aristotle for his own faith; and he did so throughout his writings, quoting "the Philosopher" as an unimpeachable authority. Aquinas used Aristotle's proof of the unmoved mover - the prime cause for all movement - as a proof for god.
The first three proofs depended on a premise held by most ancient and medieval philosophers to be a truism: any continuous infinity is impossible. An infinite chain of events is impossible, and so there must be a prime event that is self-moved and responsible for all others.
The First Efficient Cause:
Aquinas' metaphysics were based almost exclusively on The Philosopher, and so assumed some differentiations which are not always intuitive to the modern reader. This is even more confusing when Aquinas uses Aristotle's terminology but changes their meaning. For Aristotle efficient cause is the "how" of an effect, while for Aquinas it is the "how" of an existence.
With that distinction, Aquinas has another argument for god: Everything has something which is responsible for its being, and since this cannot continue infinitely, there must be a first efficient cause: god.
This way of thinking feels unatural because it assumes an Aristolean way of seeing the world. We normally think of the world as composed of underlying bits that come together to form things. Aristotle thought of the world as composed of underlying matter which could undertake forms; and that those things formed could in turn undertake properties. While this might all feel like word play, (and it might be), it has consequences for discussion. For while Aristole saw substance as mere being, for Aquinas and his Christian fellows, being was a bounty given by god to matter: existence is goodness.
The Necessary Cause:
The third proof Aquinas offered followed the same pattern: All things are contingent hence they could not have come about unless there was something that was self-necessitating: god.
Gradation of Being:
Aside from Aristotle, the other great influence on Medieval philosophy was Plato. And although the 13th century Latin philosophers barely had any of Plato's texts, various Platonic ideas had trickled through into mainstream thought through the Neoplatonists of the previous millenia. This included the idea that ideas exist separately to our thinking them. (Here Aquinas betrays Aristotle who did not quite agree).
For Aquinas, something is hot if it partakes in Hotness (which is a real, separate thing). Hence if things are good there must be some thing that is the ultimate Good: god.
Argument from Design:
The final proof, arguing for god from the world's apparent design is well known today, but took on a more basic form for Aquinas. Before Aquinas, Averroes had used Aristotle's physics to argue that the order and regularity of the world implied a teleology which was the work of a perfect intelligence.
This approach is surprising nowadays, when it is common to hear that biology implies intelligent design that implies god. Aquinas' argument is simpler but more abstract: the very fact that the world is not random implies meaning and this implies god. Aquinas doesn't need to appeal to the complexity of the eye for his god, it is fantastic enough that the moon or the planets should move in regularity.
"All that I have written seems as straw to me"
Most authors explain that Aquinas had some sort of spiritual experience, after which he lost faith in the ability of words to describe the divine. Aquinas stopped writing the Summa, leaving it uncomplete, because the goal of religion is transcendental understanding, which can only be known by direct experience.
The other explanation is darker and has, so far as I can tell, been previously left unstated: Aquinas had some sort of spiritual experience, and realised that everything he had written was irrelevant. Aquinas stopped writing the Summa because the transcendental experience shows religion to be irrelevant; a mere distraction to true understanding.
So what replaced the Five Ways for Aquinas on his deathbed? Another way, or none at all?
* They can be found in Part 1, Question 2, Article 3. More elaboraet arguments for god in Aquinas can (apparently) be found throughout the Summa Theologica, and also in the Summa contra Gentiles. A number of (especially) religious authors like to stress that the ways are only suggestive or illustrative, implying that their falsification is not relevant. A disagreement on this, based especially on the fact that Aquinas says explicitly that they are proofs, can be found here.
References: "A Shorter Summa: The Essential Philosophical Passages of Saint Thomas Aquinas' Summa Theologica" edited by Peter J Kreeft; Wikipedia.