Aitor Karanka’s side dominated from start to finish in the Teessiders’ best home performance so far, with top scorer Grant Leadbitter starting the rout with a 30-yard screamer in the 35th minute for his sixth goal of the campaign.
Albert Adomah made it 2-0 soon after half-time before on-loan Chelsea forward Patrick Bamford notched his first Boro goal in the 68th minute and Spanish substitute Kike completed the scoring in the last minute with a delightful finish.
In between the final two goals Boro were reduced to 10 men when Whitehead was sent off, but it mattered little to the final result.
It is the first time Karanka’s men have won three consecutive games since April, following their away wins at Huddersfield and Cardiff, and moved them to within three points of leaders Nottingham Forest.
Brentford were second best all afternoon as the Bees slumped to their second defeat in a row and dropped to 14th in the table.
Boro started brightly and after nine minutes George Friend whipped in a left-wing cross but Bamford’s header was easily collected by David Button.
Leadbitter’s slide-rule ball found Adomah in great space four minutes later but his touch let him down and the ball rolled back to Button.
Two minutes later Emilio Nsue breezed past Harlee Dean before trying to chip Button from distance with an ambitious effort which went well over.
The home side continued to pile forward and went close to opening the scoring after 32 minutes when a mix-up between James Tarkowski and Button almost allowed Adomah to sneak in and poke the ball home, but his effort was just wide.
But the first goal followed three minutes later when Leadbitter let fly with a long-range piledriver that whistled past Button and into his bottom right corner.
Brentford’s best effort of the first half came just before the interval when Spanish schemer Jota found space 25 yards out but his hurried shot was well over Dimitrios Konstantopoulos’ bar.
Boro’s second goal came five minutes after half-time when Belgian forward Jelle Vossen played Nsue in down the right and he crossed low across the face of the goal for Adomah to tap in from close range.
Konstantopoulos had his first save of the game to make just a minute after the second goal when Andre Gray found space in the box to shoot but the Boro ‘keeper palmed away to safety.
Boro got their third in the 68th minute when Leadbitter’s curling cross was glanced in by Bamford.
Boro’s only blemish of the afternoon came in the 83rd minute when Whitehead was shown a straight red for a clumsy challenge on Alan Judge, but despite that the home side were still able to add a fourth goal when Kike netted a sublime finish in the 89th minute.