After suffering a straight sets loss against Dominic Thiem, the Swiss was looking to bounce back and keep his chances alive of lifting the trophy here in London for the 6th time, while Berrettini was looking for his first win on his debut at the O2 Arena.
Both players started brightly, with the Italian's nerves that were so evident in his 6-2 6-1 loss against Novak Djokovic nowhere to be seen, after his forehand was firing on all cylinders, with an average forehand speed of 89mph throughout the set.
In a set which had no rallies higher than 9 shots, the serve proved the crucial factor and it was until 5-6 on Berrettini's serve when the first break point was fashioned by Roger Federer, after a misconstrued half-volley from Berrettini set up a set point.
However, the Italian's forehand once again dug him out of trouble, only until it gifted Federer an early mini-break in the tie-break after the Italian sent one flying past the baseline.
The Swiss capitalised on a double fault which gave him the double mini-break to seal the set 7-6 (2) in 44 minutes.
The clinching of the opening set saw Federer really start to express himself, and the momentum swung entirely in the world number 3's favour.
A lacklustre first game from Berrettini saw Federer break to love at the start of the second set, racing to a 2-0 lead.
Berrettini did brilliantly just to stay within touching distance from the Swiss throughout the second set, and was rewarded with break back opportunities at 4-3 after some sublime forehand play yet again.
However, the 20-time Grand Slam champion showed familiar resilience on his serve to turn the game around and take a 5-3 lead, seemingly rinsing any fight or determination the Italian had left.
Federer broke in the next game to seal the match 7-6 6-3 in 1 hour and 18 minutes to rekindle his hopes of qualification from the Bjorn Borg group.
Speaking after the match Federer said, "I'm very happy with how i played today. I was pretty clean on my service games and hopefully I can keep it up and play even better in my next match,
"I had to take positives from that first match against Dominic, I didn't think everything was bad."
Federer's final match in the group comes against 5-time champion Novak Djokovic, who later plays Dominic Thiem who are both looking for their second win of the week.