Mat Berquist's third-minute penalty gave the Italians the lead but Earls, whose knee injury had kept him out of the competition since December, finally got Munster off the mark just before half time.
James Downey found another breakthrough for the Irish province in the second half while JJ Hanrahan had a troublesome night off the tee, missing two penalties though successful with his conversions.
The win sees Munster return to second place - leapfrogging Ulster - while Leinster remain on top by two points ahead of the pair's mouthwatering tie at the Aviva Stadium next week.
The Italians had not won a RaboDirect PRO12 away game since December 2012 while Thomond Park remains as imperious as ever - Munster are the only team in the tournament with a 100 per cent home record intact.
However, Treviso took the early initiative as Berquist slotted a penalty between the posts following Sean Dougall's ill-discipline at the breakdown.
Penney's troops struggled to find their feet early on, Hanrahan spoiling a promising period of play with a loose pass from which Treviso were unlucky not to spring a counter attack.
Livewire full-back Angelo Esposito was also catching the eye for the visitors, the Italian international's deft sidestep carving up Munster before being brought down on halfway.
But Munster were slowly clicking through the gears, a neat passage of play involving Hanrahan, Duncan Williams and Casey Laulala eventually being brought back for a penalty.
Yet Thomond Park was quickly silenced as from little beyond the visitors 22', Hanrahan pulled his three-pointer wide.
And when an almost identical opportunity beckoned just before the half-hour mark, the 20-year-old failed to split the posts once more.
Treviso could have doubled their lead when Berquist was called upon for his second penalty of the night but the New Zealander followed his opposite number in misfiring.
But if Hanrahan had started sluggishly the stand-off set the game alight moments later as his blistering break from deep inside Munster territory released the fit-again Earls for the score.
There were suspicions of a forward pass but after consulting the TMO referee Leighton Hodges allowed the try to stand, before Hanrahan added a simple conversion.
Almost immediately after Berquist made it four missed penalties in a row but Munster had their tails up going into the break - and were quick to keep the momentum rolling in the second half.
Only a throng of Treviso bodies prevented Johne Murphy from touching down after concerted home side pressure straight out of the traps.
And the dam looked like it would soon burst as the Italians repeatedly buckled in the scrum, with hooker Giovanni Maistri the recipient of a yellow card.
Against the tide however Treviso received their own penalty for a Munster infringement and promptly booted the ball away - when a score had looked inevitable moments before.
The hosts were back chipping away in Treviso's half before long and despite the best efforts of Christian Loamanu, Downey crowned a Munster move by finishing in the corner.
The TMO was needed for the second time but Downey was judged to have kept out of touch before flinging himself over.
Hanrahan was clearly finding his kicking form by nailing a tricky conversion and with two tries on the board, Munster could start to thinking about chasing down a bonus point.
But a defiant Treviso never let their guard down - despite late forays from a lively Felix Jones and Earls - to round off a spirited performance.
|Munster Rugby Score Card|
|Benetton Treviso Score Card|