Second seed Federer, chasing his fifth Australian Open title, won 3-6, 6-3, 6-2, 6-2 in 2hr 9min and was to next play either Frenchman Jeremy Chardy or Italy's Andreas Seppi in the third round.
The 17-time Swiss Grand Slam champion, who developed a mystery swollen finger during the contest, lost the opening set after the only break on his serve, but he found a solution and swept through the next three sets.
Bolelli made 39 unforced errors as Federer ramped up the pressure to break the Italian's service five times.
Federer changed tactics to attack the net to great effect.
"It's always a good feeling fighting your way out of a match, winning the last three sets convincingly and actually playing really positive tennis," Federer said.
"Today I had to do some adjustments because he was doing things very well. By figuring things out it's a great feeling to have once you've got it.
"Then you're able to play consistently well, because actually he didn't have many opportunities on my serve.
"He didn't have to lose as much as me, I guess sometimes it can be an advantage and sometimes a disadvantage to be favourite."
Federer, who claimed his 1,000th Tour match in winning this month's Brisbane International, has a reputation for figuring his way out of trouble in his matches.
"I could sense there that he had a good forehand, committed on the return, solid backhand with the option to hit the slice," he said
"I wasn't that surprised, to be honest, I was just surprised how well and consistently he was doing that, and especially how well he was serving.
"But then again, conditions were fast, which made it easier to serve well and harder to return."
Federer has always made the third round in 16 attempts in Melbourne and has reached the semi-final stage for the last 11 Australian Opens.
The Swiss legend was non-plussed by a swollen finger that may have been caused by a bee sting.
"It's the weirdest thing. I don't know. I feel it on the tip of my finger. Just felt really odd starting after the (service) break, and or three, four games, I feel like it's numb and swollen," he said.
"So I just wanted to have a chat with the physio just to see what we can do. I knew we couldn't tape it up because then it would be even bigger and more weird.
"Actually it went away, but now I feel it again."