Terahertz Spectroscopy with Gigahertz Frequency Resolution