Duncan Watmore and Paddy McNair scored their first goals of the season during the first half as Boro shot up to 11th in the table, one point ahead of their visitors, who saw their five-match unbeaten run come to an end.
Story of the match
After just ten minutes, the hosts were in front. Bamba fed Marc Bola and after some neat interplay with Crooks, Watmore delivered a sublime curling effort to leave Blades goalkeeper Robin Olsen with no chance.
Billy Sharp tested Lumley while Watmore headed wide after good work by Andraz Sporar and Marcus Tavernier had Olsen scrambling across his goal for a shot which went just wide.
On the half-hour mark, George Baldock delivered a lovely ball forward, picking out Ndiaye, but, despite shouts for handball, he struck the post with his shot.
Baldock was then involved at the other end with a last-ditch tackle to deny Tavernier after good work by McNair and Sporar, but soon after Boro doubled their lead.
Crooks showed a delightful touch to lay off for McNair who smashed the ball home in the bottom corner, leaving Olsen with no chance to make it 2-0 to the hosts.
David McGoldrick was introduced after halftime and he nearly helped halve the deficit as he freed Ben Osborn, but the play wound up with Sharp heading wide.
Bamba did clear a goal-bound shot from Ben Osborn and at the other end Lumley made a fantastic save to deny David McGoldrick, while Olsen also had to react well to pull off a double save from shots by Sporar and Tavernier.
Desperate for a goal, Sharp's deep cross was nodded down by John Egan to McGoldrick, but again Lumley was there to spare Boro's blushes.
Bamba was involved in another clearance as he stuck out a leg to deflect away a shot by McGoldrick and after four minutes of extra time, Middlesbrough claimed a relatively easy victory.
Man of the match: Sol Bamba
He was the anchor in the Middlesbrough defence as he returned to the starting line-up, defending superbly and he made countless crucial blocks in the second half when Sheffield United were piling on the pressure.