Sammie Szmodics opened the scoring just before the half-hour mark when Kalvin Phillips played towards George Hirst from his own half, with Hirst then teeing up Szmodics to score into the bottom corner from the edge of the penalty area.
Hirst doubled the lead just three minutes later when he chipped the ball over Mark Flekken after Conor Chaplin played him through on goal on the right side of the box, but Brentford halved the deficit in the 43rd minute when Yoane Wissa directed the ball into the back of the net from close range.
The Bees were back on level terms in first-half stoppage time thanks to an own goal from Harry Clarke, who tried to prevent Wissa from bagging a brace after he darted in behind the Blues' defensive line, but Clarke instead dragged the ball over the line after attempting a sliding block.
Bryan Mbeumo gave the home team the lead from the penalty spot shortly after half time, and though Liam Delap thought he had earned his side a point after scoring from Leif Davis' cross from the left, Mbeumo scored a winner in the 96th minute to give the Bees a deserved three points.
The result means that Brentford climb to ninth in the table and end the day with 13 points and have now won two of their last three matches in the league, while Ipswich are yet to win in the Premier League after nine games, and linger in 17th place with just four points.
Phillips deserves credit for his role in his side's first goal, with his pass breaking Brentford defensive lines, while Ipswich as a whole did well to draw the hosts upfield during the build up to the game's second goal.
Keane Lewis-Potter did excellently to drive past the Blues' defence and pass to Vitaly Janelt, who played across the box to Wissa to score from close range for Brentford's first.
Wissa's blistering pace was enough to force an own goal from Clarke, who was later sent off after being booked twice for fouling Lewis-Potter for Mbeumo's penalty and again in the 69th minute.
Delap thought he had snatched a point in the 86th minute after Davis crossed from deep on the left into the penalty area, Mbeumo's curled delivery into the box in the 96th minute avoided everyone and bounced into the net, though goalkeeper Arijanet Muric will be disappointed to have not done more to prevent the goal.
BRENTFORD VS. IPSWICH TOWN HIGHLIGHTS
28th min: Brentford 0-1 Ipswich Town (Sammie Szmodics)
George Hirst puts Sammie Szmodics through on goal near the centre-of the box after Kalvin Phillips plays a superb pass to Hirst from his own half, before Szmodics curls the ball into the bottom-right corner.
Take a bow Kalvin Phillips!
31st min: Brentford 0-2 Ipswich Town (George Hirst)
Ipswich draw Brentford forward before attacking quickly from their own half, working the ball to Conor Chaplin, who plays a perfect pass to Hirst on the right of the penalty area before he chips goalkeeper Mark Flekken after.
Ipswich are in dreamland!
43rd min: Brentford 1-2 Ipswich Town (Yoane Wissa)
Yoane Wissa finishes from close range following excellent work from Keane Lewis-Potter, who drives from the left near the halfway line and plays a ball to Vitaly Janelt before he squares across the box to Wissa.
Game on!
46th min: Brentford 2-2 Ipswich Town (Harry Clarke own goal)
Wissa races through after breaching Ipswich's high defensive line, and while Harry Clarke does his best to block his shot, his sliding challenge carries the ball over the line.
Brentford are back!
51st min: Brentford 3-2 Ipswich Town (Bryan Mbeumo)
The referee awards the Bees a penalty after Lewis-Potter was adjudged to have been fouled by Clarke, and Bryan Mbeumo sweeps the ball into the top-right corner.
From dreamland to nightmare, Ipswich are behind!
86th min: Brentford 3-3 Ipswich Town (Liam Delap)
Leif Davis crosses from deep on the left in Brentford's half into the penalty area, and Liam Delap sneaks in front of Ethan Pinnock to equalise.
Ipswich have surely salvaged a point!
96th min: Brentford 4-3 Ipswich Town (Bryan Mbeumo)
Mbeumo picks up the ball on the touchline and drives inside and floats a ball into the box from far out on the right, but his cross evades everyone and bounces into the net.
Drama galore, Brentford win!
MAN OF THE MATCH - YOANE WISSA
His side might not have won, but Yoane Wissa was involved in everything good that Brentford did, with his relentless display contributing directly to two goals.
Brentford's first goal highlighted his poacher's instinct in and around the penalty area, with the forward intelligent enough to peel away from his marker and finish into the back of the net.
The Bees' second goal came about as a direct consequence of Wissa's intelligence and speed given the forward timed his run beyond Ipswich's backline to perfection.
BRENTFORD VS. IPSWICH TOWN MATCH STATS
Possession: Brentford 65%-35% Ipswich Town
Shots: Brentford 20-11 Ipswich Town
Shots on target: Brentford 9-5 Ipswich Town
Corners: Brentford 4-5 Ipswich Town
Fouls: Brentford 7-10 Ipswich Town
BEST STATS
WHAT NEXT?
Brentford are in action on Tuesday night against Sheffield United at home in the EFL Cup, before taking on Fulham at Craven Cottage in the Premier League on November 4.
Meanwhile, Ipswich will play against Leicester City next Saturday in what could prove to be a pivotal clash in the race to stay in the Premier League.