Coventry established an early two-goal lead within the first 15 minutes through strikes from Ellis Simms and Liam Kitching.
Middlesbrough mounted a comeback, with Morgan Whittaker scoring before half-time and a Bobby Thomas own goal levelling the score shortly after the restart.
With the game seemingly heading for a draw, Liam Kitching and Ellis Simms both scored within one minute of each other in the final five minutes of normal time.
The decisive late goals sent Coventry 10 points clear of Middlesbrough, who subsequently dropped to third place in the league.