Theologically speaking, Luther is most famous for recovering the doctrine of justification, that man is saved by the grace of God through faith, and not by his works. This seems like an obvious truth to many evangelicals today but was considered radical at the time, particularly given the cultural and spiritual climate of the day.
Before being sent to Wittenberg, Luther was a monk in Erfurt and was a notoriously tormented soul, and battled a severe form of depression. He would spend hours with his confessor and mentor, Johann von Staupitz, racking his brain and searching his soul for sins and impure thoughts to confess, which often frustrated Staupitz.
He would ultimately apprehend the liberating power of the grace of God, having meditated many hours on Romans 1, a spiritual breakthrough he got while on the toilet. Author Eric Metaxas recounts this experience in Chapter 5, "The 'Cloaca' Experience," of his recent Luther biography Martin Luther: The Man Who Rediscovered God and Changed the World. "Cloaca" is the Latin word for "sewer" and in Luther's day it had come to mean "outhouse." The same part of the building, a tower, where Luther did his biblical exegesis, had an outhouse at the base of the edifice.
Here, Luther came to understand, as he wrote in 1532, that "the righteousness of God is that by which the righteous lives by a gift of God, namely by faith. And this is the meaning: the righteousness of God is revealed by the gospel, namely, the passive righteousness with which the merciful God justifies us by faith, as it is written, 'He who through faith is righteous shall live.' Here I felt that I was altogether born again and had entered paradise itself through open gates. Thus a totally other face of the entire Scripture showed itself to me."