Leeds' promotion push back on track after seven-goal thriller at Boro
Daniel Farke's men had failed to win in their three previous Championship matches to put at risk an immediate return to the English top-flight.
Victory takes Leeds into second, one point ahead of Ipswich, with only the top two automatically promoted. However, third-placed Ipswich have three games remaining to Leeds' two.
Defeat mathematically ended Boro's hopes of going up via the playoffs.
Leeds' poor run looked like it could continue when Isaiah Jones took advantage of hesitant defending to put the home side in front after just seven minutes.
But the visitors turned the match around in an explosive first half. Summerville converted the equaliser from the penalty spot before Patrick Bamford silenced the Middlesbrough boos on his return to the Riverside.
Emmanuel Latte Lath's fierce strike from outside the box brought Middlesbrough level once more.
Leeds retook the lead in controversial circumstances before half-time as Wilfried Gnonto fired in from Summerville's pass despite the Italian international clearly being in an offside position. But with VAR not operational in the Championship, the goal was allowed to stand.
Summerville's brilliant curling effort into the top corner for his 20th goal of the season gave Leeds a two-goal cushion. And they needed it as Latte Lath's looping header set up a frantic finish three minutes from time.
"As defenders we'd like to make it a bit easier, but at this stage it's just a massive win," said Leeds captain Ethan Ampadu.
"Still two massive games to go. For us there is a lot of hard work to go."
Leeds' win means even victory for leaders Leicester over fourth-placed Southampton on Tuesday will not mathematically secure promotion for the Foxes.