Ricardo Rodriguez scored the only goal of the game in Belfast on Thursday, converting from 12 yards after referee Ovidiu Hategan gave the visitors a penalty for a handball against Corry Evans.
The Northern Ireland midfielder blocked a shot from Xherdan Shaqiri with his side as he turned away from the ball, with Northern Ireland coach Michael O'Neill describing the costly decision against his side as "staggering".
But a tongue-in-cheek Federer, who is preparing to play at the ATP Finals in London, suggested he agreed with the controversial call made the Romanian referee.
"I heard the Northern Ireland guy was trying to catch it, like a handball," the veteran Swiss joked.
"And it was a clear penalty for Switzerland.”
Switzerland will host the second leg against Northern Ireland on Sunday, with Evans suspended after he was booked following the decision.