Federer saved three match points and came from two sets down to beat Cilic and reach 11th Wimbledon semi-final. With this victory, he surpasses Martina Navratilova's long-standing record of most number (307) of Grand Slam wins.
Roger Federer put his global army of "Fed-Head" fans through the wringer for four nerve-shredding sets before he kept alive his pursuit of a record eighth Wimbledon title with a 6-7(4) 4-6 6-3 7-6(9) 6-3 win over Marin Cilic the quarter-finals on Wednesday.
Novak Djokovic's shock third round exit had raised hopes that this could be the week when the Swiss finally ends his four-year hunt for an 18th grand slam title, as the Serb had been the only man to beat him at the majors over the past year.
However, all those expectations appeared to be heading for the dustbin as Cilic stood one point away from victory -- not once, not twice but three times in a pulsating fourth set that had everyone on the edge of their seats.
Three huge serves kept Federer alive -- just -- and he then produced the kind of form, and outrageous shots, that has made him the most successful man in tennis by stealing the tiebreak 11-9.
An ace on his first match point finished off the job and carried him into an 11th Wimbledon semi-final, and 40th overall in the majors.
His dramatic triumph was his 84th win at Wimbledon -- taking him level with Jimmy Connors.
He will face another big-server, Canadian Milos Raonic, for a place in Sunday's final.
"I knew I was in so much trouble in the third and again in the fourth," Federer said after walking off Centre Court to a standing ovation.
"It wasn't going well for me. So for me it was about staying in the match and somehow hope for his level to drop ... and maybe get a bit lucky. That's exactly what happened at 3-3, 0-40 (in the third set)," added Federer about the game where he saved three break points.
"Obviously the breaker was crazy. It was an incredible match. Marin is one of the nicest guys on the tour so I feel sorry for him but for me the dream continues."
The win also made him the most successful player, man or woman, at the majors as he chalked up a record 307th singles win.
"I cannot believe Roger Federer won that match. How did he get out of that?" gushed American great John McEnroe.
"You've got to love the courage that he is able to find a way to do that, that is a killer loss."
Having missed last month's French Open with a back injury, the five set thriller also delivered a knockout punch to those thinking the Swiss third seed did not have the stamina to last the distance.
"It's really encouraging for me to see that I am improving. As the match goes on, I was able to sustain a really high level of play," added the 34-year-old, who came back from two-sets down for the 10th time in his career.
"My legs were there, my back was there, serving was key. Plus mentally this is going to give me a hell of a boost. I am ecstatic that I was able to come through somehow."
Murray survives Tsonga comeback
Second seed Andy Murray survived a ferocious Jo-Wilfried Tsonga comeback to reach the Wimbledon semi-finals for the seventh time after winning the day's second Centre Court blockbuster 7-6(10) 6-1 3-6 4-6 6-1.
Second seed Murray, hot favourite after champion Novak Djokovic's third-round demise, was outplayed in sets three and four as winners flowed from Tsonga's racket.
He then had to save a break point at the start of the decider, rediscovering his earlier form and racing away to a victory cheered by a packed arena, sealing it with an ace.
The 29-year-old now sets his sights on Czech 10th seed Tomas Berdych in Friday's semi-final.
Raonic powers past Querrey
Raonic produced an irresistible display of classic grasscourt tennis to overcome giant-killer Sam Querrey 6-4 7-5 5-7 6-4.
The influence of John McEnroe, a new addition to his coaching team, was apparent as sixth-seeded Raonic charged into the net behind his booming first serves and confounded American Querrey with a succession of deft winning volleys.
So great was the 25-year-old's control of the first two sets that he lost just seven points on his serve during that period and faced no break points, in a display at times reminiscent of Pete Sampras in his heyday.
Berdych cruises past Pouille
Czech 10th seed Tomas Berdych ended Frenchman's Lucas Pouille's unexpected love-affair with Wimbledon on Wednesday, grinding out a 7-6(4) 6-3 6-2 win to reach his sixth grand slam semi-final.
Second seed Andy Murray survived a ferocious Jo-Wilfried Tsonga comeback to reach the Wimbledon semi-finals for the seventh time after winning the day's second Centre Court blockbuster 7-6(10) 6-1 3-6 4-6 6-1.Second seed Murray, hot favourite after champion Novak Djokovic's third-round demise, was outplayed in sets three and four as winners flowed from Tsonga's racket.
He then had to save a break point at the start of the decider, rediscovering his earlier form and racing away to a victory cheered by a packed arena, sealing it with an ace.
The 29-year-old now sets his sights on Czech 10th seed Tomas Berdych in Friday's semi-final.