1520s, "low G, lowest note in the medieval musical scale" (the system of notation devised by Guido d'Arezzo), a contraction of Medieval Latin gamma ut, from gamma, the Greek letter, used in medieval music notation to indicate the note below the A which began the classical scale, + ut (now do), the low note on the six-note musical scale that took names from syllables sung to those notes in a Latin sapphic hymn for St. John the Baptist's Day:

Ut queant laxis re sonare fibris

Mira gestorum famuli tuorum,

Solve pollutis labiis reatum,

Sancte Iohannes .

The ut being the conjunction "that." Gamut also was used for "range of notes of a voice or instrument" (1630s), also "the whole musical scale," hence the figurative sense of "entire scale or range" of anything, first recorded 1620s. When the modern octave scale was set early 16c., si was added, changed to ti in Britain and U.S. to keep the syllables as different from each other as possible. Ut later was replaced by more sonorous do (n.). See also solmization.