“They could easily have gone another way I know that.
“I was a bit fortunate to win that first set but I played okay and I fought extremely hard.
“Sometimes it falls your way. I have had a good season and served well at the end.
“The first set was certainly crucial to put me in the lead.”
Federer will now face Alexander Zverev for a place in the semi-finals after the German beat Andrey Rublev 6-0, 7-6.
Roger Federer wants 'to be explosive' after Laver Cup
On the other side of the draw, Novak Djokovic barely appeared to break sweat in his clash John Isner, the American failing to create a single break point opportunity, despite admitting he felt 'a little bit of a pain' in his troublesome elbow during one point.
However, the world No 1 played doubles later in the day with no ill effects - other than losing to all-British pair Jamie Murray and Neal Skupski.
But Djokovic was still pleased with the way he was able to deal with the Isner serve in his singles victory.
“It is always a big challenge returning the serve of Isner,” he said.
“He has got one of the biggest serves of all time and one of the tallest guys ever to play tennis.
“With that height the serve is a huge weapon and huge advantage.
“I managed to find a good position on the return at the end of the first set and beginning of the second.
“I won five games in a row and that was the key, obviously having a break each set.
“Then I kind of held my serve. I felt it was one of the best serving matches I’ve had.”