Spectroscopic measurements in the millimeter, submillimeter, or THz range, with resolutions exceeding a MHz, provide for highly specific detections of gas-phase absorption and emission by atoms and molecules. Due to relatively low excitation energies involved in the transitions, multiple features are observable in most physical systems, and thus such observations dominate the scientific discovery of molecules in space and contribute significantly to remote sensing of the Earth and planetary bodies. The methods and techniques of THz spectroscopy continue to evolve as capabilities and technologies expand. In this article, we review the genesis of THz spectroscopy in both the laboratory and in space, and follow its development to date, providing background on the challenges, and context for the current developments that promise to extend both remote and in-situ gas composition sensing.