The sensing performance of a subwavelength one-dimensional linear rectangular gold grating platform with the attenuate total reflection (Otto) coupling technique for gas detection has been numerically studied in the THz range. Grating parameters optimal for exciting surface plasmon resonances with maximum efficiency were found. Dispersion analysis of surface waves confirmed correctness of reflection spectrum simulations. The fundamental and 1st order modes of deep grooves demonstrated a very high sensitivity to a small refractive index change, up to 1.5 THz/RIU (in the frequency domain) and 557 deg/RIU (in the angular domain), with a refractive index detection limit of the sensor of 7.10-3 RIU and 1.5. 10-7 RIU, respectively. As compared with the fundamental modes, the high-order modes showed greater FOM values (up to 810 1/RIU for the 1st order) due to the sharpness of their resonances. These sensing characteristics are very promising for creating THz sensors based on subwavelength gratings.