Froome, pictured, attacked with about four kilometres remaining of the tough 186km route from San Vito al Tagliamento. The four-time Tour de France champion gritted his teeth on the final curves of the iconic climb and managed to finish six seconds ahead of Yates.
Domenico Pozzovivo was third, 23 seconds behind Froome, whose chances of winning the race all but ended after a difficult opening week.
Froome, who dropped out of the top 10 earlier this week, moved up to fifth although the Team Sky rider is still more than three minutes behind Yates.
“We’ll take it day by day, it’s not over yet,” said Froome, who is trying to become the third person to win three Grand Tours in a row.
Froome crashed in training before the opening time trial, lost time in a split on stage four and injured himself again in a second crash last Saturday.
“It was a very important attack, also for the morale,” Froome said. “It was a very important moment for this Giro. A very famous climb, with a great story. For that reason it was a very strong motive for me to try to win here. When I fell in Jerusalem, it’s always difficult to recover. I didn’t feel normal so I’m very happy to win today.”
Yates, who rides for Mitchelton-Scott, extended his lead over defending champion Tom Dumoulin to 1:24.
“I tried to go for the stage,” Yates said. “I did my best to catch Chris. I just didn’t have enough. But as far as the Maglia Rosa is concerned, it’s all good to be second here.”
Pozzovivo moved up to third in the overall standings, 1:37 behind Yates.
There were four categorised climbs ahead of the finish on Monte Zoncolan, which is regarded as the hardest climb in Europe with an average 12 percent gradient and a maximum of 22 per cent.
Today’s 15th stage is another gruelling leg with the riders almost continuously climbing and descending on the 176-kilometer route from Tolmezzo to Sappada.
Monday sees the Giro’s third and final rest day, before the individual time trial, Dumoulin’s speciality.
The Giro ends in Rome on 27 May.