Having thrashed Denis Istomin in his Melbourne Park opener, third seed Federer faced a different beast in world number 189 Evans, who made a mockery of his ranking and pushed the Swiss hard throughout a high-quality duel at Rod Laver Arena.
"It feels like playing a mirror a little bit and that was my mindset going in," 20-times Grand Slam champion Federer said of qualifier Evans, who is rebuilding his career after serving a year-long drug ban.
"He has a lot of slice and more serve and volley, my size can help me a bit more."
Showcasing a sturdy defence and counter-punching gamely, Evans broke Federer for the first time in the tournament, dragging the former world number one into a second tiebreak to cheer British fans after Andy Murray's first round elimination.
But the Birmingham man lacked the edge in the clutch points while Federer was clinical.
He broke Evans in the fourth game of the third set and served out the match to love, sealing the win with an imperious backhand winner down the line.
"He was feeling it today, I thought," said Federer, who will play Taylor Fritz for a place in the fourth round.
"He was very sort of cat and mouse a bit. Very interesting. I liked the match. I thought he was playing well. It was enjoyable."
Evans sparkled in a run to the fourth round at the 2017 tournament but missed last year's action at Melbourne Park, after testing positive for cocaine at the Barcelona Open.
He entered Rod Laver Arena for his Federer match-up to a soundtrack of Blur's Britpop anthem "Parklife".
There was nothing hazy about his game, however, as he attacked the lines with abandon and rushed the net with conviction.
He saved a set point at 6-5 with a punchy backhand volley down the line and had Federer on the ropes in the tiebreak.
But instead of volleying into an open court to prise a set point off the Swiss, he pushed the forehand well wide.
Reprieved, Federer took full advantage and closed out the set when a scrambling Evans missed a desperate backhand passing short.
The Briton was clearly gutted by the lost chance and promptly threw away his next service game in the second set while still in a funk.
Yet he regathered his wits quickly.
He battled to save two set points at 5-3 down and then broke back to 5-5, outpointing Federer with an elegant one-handed backhand passing shot that the former world number one would have been proud to call his own.
Once again, Federer lifted in the tiebreak, bringing up three set points in a trice and converting the first with an ace.
From there it was a formality for one of the game's most ruthless front-runners as Federer cruised to victory to keep his bid for a hat-trick of Melbourne titles alive. (Editing by Amlan Chakraborty)