"Was Gott tut, das ist wohlgetan" (What God does, that is done well) is a Lutheran hymn written by the pietist German poet and schoolmaster Samuel Rodigast in 1675. The melody has been attributed to the cantor Severus Gastorius. An earlier hymn with the same title was written in the first half of the seventeenth century by the theologian Michael Altenburg.
As described in Geck (2006), an apocryphal account in the 1687 Nordhausen Gesangbuch (Nordhausen songbook) records that the hymn text was written by Samuel Rodigast in 1675 while his friend, the cantor Severus Gastorius, whom he knew from school and university, was "seriously ill" and confined to his bed in Jena. The account credits Gastorius, believing himself to be on his death bed, with composing the hymn melody as music for his funeral. When Gastorius recovered, he instructed his choir in Jena to sing the hymn each week "at his front door ... to make it better known."
Rodigast studied first at the Gymnasium in Weimar and then at the University of Jena, where from 1676 he held an adjunct position in philosophy. In 1680 Rodigast was appointed vice-rector of the Gymnasium zum Grauen Kloster in Berlin, eventually becoming rector in 1698. In the interim he had refused offers of a professorship at Jena and school rectorships elsewhere.
He was closely associated with the founder and leader of the pietist movement, Philipp Jakob Spener, who moved to Berlin in 1691 and remained there until his death in 1705.
In his 1721 book on the lives of famous lyric poets, Johann Caspar Wetzel reports that already by 1708 Rodigast's hymn had acquired the reputation as a "hymnus suavissimus & per universam fere Evangelicorum ecclesiam notissimus," i.e. as one of the most beautiful and widely known church hymns. The text of the hymn was first published without melody in Göttingen in 1676 in an appendix to the Hannoverische Gesangbuch (Hanover songbook). It was published with the melody in 1690 in the Nürnbergische Gesangbuch (Nuremberg songbook).