First-half goals from Grant Hall and Paddy McNair put the Teessiders two goals ahead before substitute Nathanail Mendez-Laing scored his first goal for the club in the closing stages.
The hosts changed formation in the first half, switching from a back three to a back four, which gave the side more balance.
Boro are still eight points off the Championship play-off places with ten games to go following Barnsley’s win over Bournemouth.
This performance showed just what the Teessiders are capable of, though, and Warnock will hope his side can go on a late run to apply pressure on the teams above them.
Boro will now prepare for Tuesday’s home meeting with Preston, before next weekend’s trip to Millwall.
Here’s how the hosts fared at the Riverside: