Johann Gottfried Walther (Erfurt, 1684 - Weimar, 1748) was a German composer, organist and musicologist. He was a cousin of Johann Sebastian Bach and studied with Johann Bernhard Bach, a second cousin of J.S. Bach.

Initially, Walther studied law at the university of Erfurt. But he soon found out that music was his true vocation, and abandoned his studies to become a composer. In 1702 he was appointed as organist in Erfurt, and in 1707 as municipal organist in Weimar, playing the organ at the church of St. Peter and St. Paul. For a while, he privately tutored the young prince Ernst von Sachsen-Weimar.

Already in his lifetime, Walther was recognized as a great organist and composer, many of his compositions deemed on a par with those of Bach. However he grew disillusioned by being continually passed over for important posts, notably the one as successor to J.S. Bach at the Royal Court in Weimar.

Much of Walther's work has been lost, including most of his many vocal sacred works. What remains is a splendid body of organ works, mostly chorale preludes and organ transcriptions of Italian and German concertos (like those of Corelli, Albinoni, Torelli and Telemann), and some harpsichord pieces.

As a musicologist, Walther is best known for his Musicalisches Lexicon (Leipzig, 1732), a vast dictionary of music and musicians, the first of its kind in the German language. This thoroughly compiled book draws on over 250 separate sources (like theoretical treatises of the early Baroque and Renaissance, and the writings of Johann Mattheson), defines over 3000 musical terms, and contains biographical information about composers and performers up to the early 18th century, including the Bach family.