Sub Tommy Miller came off the bench to clinch Ipswich's 14th home win in their last 15 games at Portman Road against a battling Scunthorpe side, who chalked up a tenth game without a victory.
Miller's 20-yard free-kick sealed the points in a topsy-turvy encounter in which Scunthorpe led 1-0 and then trailed 2-1 before drawing level, all in the first 33 minutes of the match.
Their resolute defending and less praiseworthy timewasting looked as if it was going to hold out for a valuable point, but Ipswich had kept knocking all through the second half and just about deserved the win.
Ipswich had an early penalty shout denied when Danny Haynes went down under an Andy Butler challenge, before Martin Paterson poked wide from close range when a Paul Hayes cross reached him six yards out.
The visitors went ahead on 16 minutes when Town stood off Ian Morris and his 25-yard screamer crashed down off the bar for Paterson to finish from close range. Replays showed Morris' shot had gone in, but the officials hadn't spotted it.
Within five minutes though Ipswich were in front, as first Pablo Counago prodded home from close-range after a free-kick and then the Spaniard split the Scunthorpe defence with a superb ball and Owen Garvan rounded Joe Murphy to slot home.
Town nearly scored again on 24 minutes when another excellent Counago pass freed Jon Walters down the flank and when he crossed the striker smashed a left-foot shot against the bar from 15 yards.
Garvan had a low shot held by Murphy, but, just as Ipswich seemed to be in control, Gavin Williams lost the ball deep in his own half to Hayes and it rebounded to Paterson who raced through to coolly score.
Murphy palmed away a Williams cross-cum-shot, Garvan volleyed over from a corner and then Counago shot over from a Walters pass as Ipswich sought to regain the lead before the break.
Both sides had chances early in the second half, Haynes shooting over and wide for Ipswich, while a corner from Kevan Hurst went right across the Town six-yard box with no-one on hand to turn it home.
Neil Alexander palmed away a Paterson header from a Hurst cross which could have brought him his hat-trick, but it was an isolated moment as wave after wave of Ipswich attacks swept forward.
Jim Goodwin cleared a Jason De Vos header off the line from a Miller corner and then Alan Lee's looping header was somehow scrambled away when it looked set to drop into the far corner.
Murphy saved a low Walters shot and De Vos headed another Miller corner onto the roof of the net, before Town scored what proved to be the winner when Marcus Williams needlessly handled on the edge of his box and Miller curled the ball just inside the post.
Counago and Garvan both came close to a fourth goal for the hosts and despite Scunthorpe making a late double change, Town held on fairly comfortable for their tenth home win in 11 games this term.