Luther proclaimed salvation as a gift of God's grace, rather than something earned by human efforts. The Roman Catholic Church spoke of God's grace also, but as an enabling power that helped human beings do the works required for obtaining salvation. Luther still preached that we should do good works, but said those works were a fruit of being saved rather than a source of salvation.
Luther had gone through his own personal struggle as a monk, feeling he was always under the judgment of God. But then he came to realize, from Romans 1:16-17, that "in the gospel the righteousness of God is revealed" that gives salvation apart from human works. This personal experience became the focus of his theology -- salvation as the free gift of God that lifts sinners from despair.
It stemmed from the annexation of the Republic of Texas by the U.S. in 1845 and from a dispute over whether Texas ended at the Nueces River (the Mexican claim) or the Rio Grande (the U.S. claim).