Cassano headed home from an Andrea Pirlo corner on 35 minutes, before Balotelli volleyed a brilliant second on 90 minutes.
The Azzurri qualified second from Group C after Spain beat Croatia 1-0 in the other Group C match. There was a nervous wait at the end as the final seconds ticked down in Gdansk, where a Croatian equaliser would have sent Italy home.
Giovanni Trapattoni's Ireland produced their best performance of the tournament, but were still well beaten and exit the tournament with three defeats from as many games. Keith Andrews was sent off late on, picking up a second yellow card for dissent.
Italy coach Cesare Prandelli made a radical tactical shift, abandoning his three-man defence and reverting to a more familiar back four - thereby returning Daniele De Rossi to his preferred midfield station.
Balotelli, still nursing a minor ankle injury, was left on the bench and his replacement Antonio Di Natale had a fine game, linking instinctively with Cassano and looking a constant goal threat.
Trapattoni made a single change, restoring Kevin Doyle at Simon Cox's expense, while making Damien Duff captain to mark his 100th cap.
Despite enduring a miserable tournament on the pitch, the Irish fans were in terrific voice, belting out both nations' anthems and frequently indulging in a geographically accurate version of 'the Poznan'.
And early on, the boys in green fared showed signs of the fine form that saw them qualify in the first place.
Doyle seized on an errant Andrea Pirlo pass and nearly got a shot away, while the Italian box was bombarded with balls in from the flanks.
But Italy established a foothold and became increasingly dominant as the first half progressed.
Cassano crossed low for Di Natale whose low shot was charged down by Richard Dunne, before Sean St Ledger's block of a Di Natale shot brought fervent - though unsuccessful - penalty appeals.
Italy won a cheap corner after Shay Given spilled a Cassano shot, and the Azzurri duly took the lead. Cassano glanced Pirlo's delivery goalwards, Given made half a save and Duff hooked it away from his position on the far post.
However, the officials rightly adjudged the ball to have crossed the line.
That goal moved Italy provisionally top of the group, but they knew events in the other Group C match in Gdansk could take matters out of their hands.
The second half followed the same pattern as the first, as Cassano and Di Natale were denied by some heroic Irish blocks. Di Natale went off on 75 minutes having racked up seven shots, six on target.
Italy suffered a potentially crucial injury when their best defender Giorgio Chiellini went down just before the hour mark - the Italians' body language suggested the Juventus man will not play again in this tournament.
Ireland threatened to break Italian hearts as the second half went on and the Azzurri became nervous. Countless set piece chances came and went, while Andrews tested Gianluigi Buffon with a long shot.
It took the substitute Balotelli to put the result beyond doubt. He met a corner from the Italian right with a sweetly-struck volley on the turn, and Given had no chance.
Balotelli dusted off his customary no-celebration celebration, and Leandro Bonucci put his hand over the striker's mouth as he unleashed a tirade of abuse at someone or something.
As news of the Croatian defeat came through, Italian celebrations began in earnest and they can look forward to a last-eight tie against the winners of Group D - France, England or Ukraine.