A broad linewidth and a lack of spectral analysis limit the applications of plasmonic sensors. In this Letter, a plasmonic sensor with a large sensitivity in the terahertz (THz) range is proposed based on high-quality factor (>1000) surface lattice resonance in subwavelength near-flat metallic gratings. Moreover, such a highly selective spectral manipulating scheme, plus the greatly localized plasmonic resonance, enables miniaturized spectroscopy based on a single detector by integrating an electro-optical material with the gratings. A spectral resolution of 0.1 GHz at a center frequency of 1.1 THz is predicted showing a four times improvement of measuring efficiency. This technique shows promising potential in on-site matter inspection and point-of-care testing.