He had led Novak Djokovic by two sets to love and held two match points in the decider only for his opponent to produce a lasso of a forehand return that turned the match on its head.
The loss ensured Federer finished a season without a grand slam title for the first time since 2002 and added fuel to the fire of those who believed he would never again win one of the sport's four majors.
But Federer always believed and, after finishing the year by winning three titles, including the ATP World Tour Finals, he ended his two-and-a-half-year grand slam wait with victory over Andy Murray in the Wimbledon final.
That also took the 31-year-old back to number one in the world, a position he had last held in June 2010, and he goes into this year's US Open as the man to beat.
Federer said: "It's been a great last 12 months. I always did believe that if things turned for the better for me, I was always going to be very near to world number one.
"I wasn't far off, but I couldn't plan on Novak going on a 40-match winning streak or Rafa (Nadal) going for four grand slams in a row as well. Other guys also have their part to play in it. It's not only up to purely myself.
"That's where you have to be patient sometimes and just keep working hard and believing that what you're doing is the right thing as well."
Federer had hoped to add a first Olympic singles gold to his seventh Wimbledon title but Murray claimed revenge in emphatic fashion on Centre Court.
The world number one was back to his best in beating Djokovic to win the Cincinnati Masters last weekend, though, and radiated confidence as he discussed his chances in New York.
"This time around I feel like if I'm playing well I can dictate who's going to win or lose," said Federer, who plays America's Donald Young in round one.
"It's going to take something special from my opponent to win. That's kind of how it feels right now. Then again, I might walk away on Monday having lost in the first round.
"I will never ever underestimate an opponent ever again. I did that enough when I was a teenager. Those times are long gone.
"I'm just happy how I'm playing. I already reached my goal for the year becoming world number one and getting Wimbledon again and getting a medal for Switzerland. It's been incredible.
"But I do have this one left for me this year where I really, really want to do well, and I couldn't be more happy returning here as number one. It's super exciting."
Federer, Djokovic and Murray share top billing but the absence of Nadal is keenly felt in New York.
The Spaniard, who won the title in 2010 and reached the final again last year, has not played since Wimbledon because of a knee injury.
Federer hopes the extended break will mean Nadal can return to the tour fit and healthy later in the year.
"It would be better if he would be here, but then again, it's good to see him maybe giving it a chance to heal and taking tough decisions like not coming here," said Federer.
"It's been a brutal process for him, I'm sure, missing the Olympics, which I'm sure was also a big goal for him. Then the North American swing and now this. This is significant, but it's not been six months yet.
"He's had a great run in grand slams as well and playing so many tournaments. Many people thought he was going to break down way earlier, and he has played I think four years longer than people already expected.
"People thought four years ago the end is very near. None of that. I just hope he's taking a little rest right now and hopefully coming back strong for the end of the year."