We analyze the operation of a resonant detector of terahertz (THz) radiation based on a two-dimensional electron gas (2DEG) channel with split gates. The side gates are used for the excitation of plasma oscillations by incoming THz radiation and control of the resonant plasma frequencies. The central gate provides the potential barrier separating the source and drain portions of the 2DEG channel. Two possible mechanisms of the detection are considered: (1) modulation of the ac potential drop across the barrier and (2) heating of the 2DEG due to the resonant plasma-assisted absorption of THz radiation followed by an increase in thermionic dc current through the barrier. Using the device model, we calculate the frequency and temperature dependences of the detector responsivity associated with both dynamic and heating (bolometric) mechanisms. It is shown that the dynamic mechanism dominates at elevated temperatures, whereas the heating mechanism provides larger contribution at low temperatures, T>~35-40K.