Ipswich, third from bottom before the start of play, thought they could salvage a priceless point when Marcus Bent equalised with 20 minutes left. Bent and Marcus Stewart - guilty of a bad first half miss from 12 yards - had threatened before the Tractor Boys moved up a gear and the 33,871 Upton Park crowd grew increasingly anxious as their team conceded increasing amounts of possession.
By then, Ipswich should have been put to the sword by a West Ham side that had created, but wasted, a spate of good chances. Fredi Kanoute was the worst offender on a day when his pace and strength threatened to destroy Town's back four but, for all his flicks and tricks, his wayward finishing let him down.
Having said that, he was denied another clear opening in the 13th minute when Di Canio, sent clear by the left foot of Lomas, took on one defender too many and the chance slipped by.
When Hammers did finally break the deadlock in the 36th minute of a tepid first half, it was Lomas who again emerged as the unlikely hero. Di Canio sent over a floated inswinger from the right and up popped the Irishman, just in front of keeper Matteo Sereni, to head home from eight yards. For the second home game in succession, 'Lomi' had upset the first goalscorer form book - and, remarkably, with yet another header, too!
West Ham should have added to the score but squandered three more decent chances before half-time. Joe Cole, who, like James, has now gone for the shaven-headed look, didn't fully connect with a cross from Sebastien Schemmel and Sereni managed to turn his effort round for a corner.
The Italian keeper then dived low to foil a volley from fellow countryman Di Canio after good work from Cole, while Di Canio's exquisite ball, curled with the outside of his foot beyond the Ipswich defence, was not anticipated by Kanoute, as another chance went begging.
Kanoute's frustration in front of goal was summed up just four minutes after the break, when Di Canio, who seemed to have run the ball out of play on the left bye-line, struck the bar with his cross-shot, only for the French striker to blaze the rebound to the back of the Bobby Moore Stand lower with the goal at his mercy.
The ever-adventurous Schemmel showed his compatriot how to hit the target but twice in the space of seconds Sereni was equal to his long-range efforts.
Fears that Hammers might be made to pay all those missed chances became reality when Tomas Repka undid another afternoon's good work in defence by slicing a right-footed clearance to Marcus Stewart, just inside the box. His cross led to a goalmouth scramble and although James managed to block one close range effort, he couldn't do anything to stop Bent ramming home the equaliser.
Cue Jermain Defoe. The England under-21 striker was going through another of his lengthy warm-ups when Di Canio took the heat out of the situation with a sublime finish that is typical of the man.
Di Canio first tested Sereni with a stinging 20-yarder that the Town keeper could only beat out with his fists...only to see the West Ham skipper net the rebound with a delightful right-foot volley from 12 yards.
Two minutes later and Defoe finally made his entrance at the expense of Kanoute. Di Canio just failed with an audacious lob that would have won goal of the season before the kid once again showed his goalscoring instincts to put that match beyond Ipswich in the 86th minute.
There didn't seem any hint of a scoring chance when he received Di Canio's pass 20 yards out and with his back to goal. But as Ipswich backtracked, Defoe dug the ball out and found the bottom left-hand corner of the net with minimum backlift.
It was his eighth Premiership goal of the season - an excellent account considering he has made just 10 league starts. His 12 goals in all competitions make him the club's leading scorer.
Di Canio was quite happy to make way for John Moncur in stoppage time, receiving a warm ovation that he millked to the end by returning to the field at the final whistle for more handshakes and waves to all corners of the ground.
Kanoute will be eager to get back on the goals trail against so many of his fellow Frenchman at Fulham on Easter Monday but, if not, Glenn Roeder knows he has the perfect alternative in the irrepressible Defoe...
2 - A flowing move involving Sinclair, Schemmel, Kanoute allows Di Canio to skip into the box but the Italian loses his footing at the vital moment and the ball trickles through to Sereni.
7 - Marcus Bent twists past Dailly and Carrick before planting a low 25-yarder just wide of the post.
9 - Hammers almost take the lead in bizarre circumstances, as Schemmel's dangerous cross from the right is completely miskicked by Wilnis and appears to be heading towards the bottom corner until Sereni dives across to tip the ball round for a corner.
11 - Marcus Bent nods down a long pass for Stewart, who drags a left-foot shot wide of the upright from 18 yards out.
14 - Lomas releases Di Canio, who turns inside Venus but chooses not to feed the onrushing Kanoute and is instead crowded out by defenders as he tries to turn again.
19 - Kanoute collects from Di Canio and finds Cole supporting but the England youngster fires weakly at Sereni.
20 - Cole this time returns the favour for Kanoute, but the Frenchman sees his effort blocked by Venus.
21 - Kanoute blasts over from 25 yards as Hammers begin to get a little frustrated by their failure to find the opening goal that their domination deserves.
36 - GOAL! It's that man again, Steve Lomas, who pops up to head Di Canio's left-footed cross in from six yards out and celebrate his second opening goal in as many weeks. West Ham United 1 Ipswich Town 0.
39 - Cole sets up Winterburn, whose low left-foot shot from 25 yards out is held comfortably by Sereni.
40 - Nearly a second goal for Hammers as Schemmel's persistence on the right sets up Cole, whose right foot shot is superbly tipped round the post by Sereni.
42 - Delightful football from West Ham, as Sinclair's impudent chip finds Cole, who hooks the ball back, but Di Canio volleys straight into the arms of Sereni.
43 - The Hammers are on fire as Cole, at the centre of the action, releases Di Canio on the left. The Italian sends in a tantalising cross with the outside of his boot that is just inches away from being finished off by Kanoute.
Added time: 1 minute.
Half-time: West Ham United 1 Ipswich Town 0.
46 - Substitution for Ipswich, Miller replaces Wright.
49 - Hammers miss a glorious chance as Di Canio skips down the left and - despite appearing to run the ball out of play - is allowed to cut back a cross from the byline that is palmed out by Sereni to the six yard box, where Kanoute is waiting to amazingly blast the ball high over the bar.
54 - Substitution for Ipswich, George replaces Peralta.
58 - Schemmel plays a quick one-two with Di Canio on the right before unleashing a right-foot volley that bounces dangerously in front of Sereni, forcing the Italian keeper to palm the ball round for a corner.
60 - Hammers are beginning to turn on the style as they dominate proceedings. Sinclair tests Sereni with a 30-yard volley and moments later pulls off a cheeky backheel to find Cole, who chips a ball over the defence for Kanoute to run on to, but the Frenchman is still struggling to find his shooting boots and fires over.
62 - New arrival George tests James with a blistering 30-yarder that the England keeper holds well.
65 - Carrick's clever pass sets Kanoute away down the middle, but this time the striker stumbles and loses possession as he reaches the penalty area and the ball runs through to Sereni.
69 - Di Canio's deep corner reaches Lomas, who heads into the danger area, where Kanoute challenges Sereni and a goalmouth scramble ensues, before Hreidarsson clears for a corner.
70 - Miller booked for a foul on Cole.
71 - GOAL. Hammers pay the price for failing to convert their chances as Repka's hashed clearance falls to Stewart in the box. His effort is saved by James but the ball drops to Bent, who fires into the net from 10 yards out. West Ham United 1 Ipswich Town 1.
74 - GOAL! An immediate reply as Paolo Di Canio finally exerts the touch of genius that Hammers so desperately needed. The Italian collects a free-kick from Cole and fires in a bouncing effort that Sereni can only parry back out. The ball appears to be heading to safety, but Di Canio is following up and places a delightful volley into the far corner of the net to restore his team's lead. West Ham United 2 Ipswich Town 1.
76 - Substitution for West Ham, Defoe replaces Kanoute.
79 - Marcus Bent booked for dissent.
85 - Hammers break on the counter attack as Sinclair cleverly finds Di Canio. The Italian dribbles to the edge of the area before attempting a chip that just clears the crossbar.
86 - GOAL! A late goal from a substitute to seal the points, who else but Jermain Defoe! Di Canio's pass finds the youngster, who runs at the Ipswich defence before slotting a low shot into the far corner from 18 yards out for his customary strike in the dying moments. West Ham United 3 Ipswich Town 1.
90 - Substitution for West Ham, Moncur replaces Di Canio.
Added time: 3 minutes.
Full-time: West Ham United 3 Ipswich Town 1.