Roger Federer overcame a two-set deficit Friday at Wimbledon to avoid his earliest Grand Slam exit since 2004.