Nairo Quintana (Movistar), champion in 2016, looked set to take the overall lead from Jesus Herrada (Cofidis) - who was dropped with 30km to go - and the stage victory, as he charged ahead with fellow Miguel Angel Lopez (Astana) on his tail towards the top of the final climb.
Yates (Mitchelton-Scott), however, bided his time before attacking in the brief flat section as the final kilometre approached. He closed in on the duo and then surged ahead as the climb kicked in on the 171km route from Cistierna to Les Praeres de Nava.
He finished two seconds ahead of Lopez and Alejandro Valverde (Movistar) and seven seconds clear of fifth-placed Quintana, retaking the red jersey after ceding it to Herrada on Thursday.
Yates holds an overall 20-second lead over 2009 winner Valverde and 25 over Quintana, with Lopez 47 seconds back in fourth.
"I chose my moment really well and didn't look back until it flattened out a little. There was a bit of a gap, so I just gave everything to the line," Yates said. "I'm much happier now, I feel I deserve it more this time. I gave everything I could.
"I didn’t know the final climb, I only saw a video and then some pictures this morning. I rode conservatively at the beginning because I didn’t know how steep and narrow it would get.
"I took it with calm to wait for the right moment to go. We can’t say I’m dominant. We’ve only had one long final climb, on Stage 9, and the gaps are still small."
Yates's Australian teammate Jack Haig finished 13th and lies 15th in the general classification.
In the strong early break with Ivan Garcia Cortina (Bahrain-Merida), Brent Bookwalter, Nicolas Roche (BMC), Thomas De Gendt (Lotto Soudal) and Michael Woods (EF Education First-Drapac), Michal Kwiatkowski (Sky) also made a bid to recoup lost ground when he went later for a solo long-range attack, only to be caught in the final four kilometres.
“If you don’t try, you’ll never know if it’s possible to gain time on GC and win a stage," Kwiatkowski said. "That’s why I went for the breakaway today.
"I looked at the stages yesterday and this week-end, I thought this was the opportunity. It wasn’t the biggest breakaway but we had strong riders with Thomas De Gendt, Nico Roche and the others but we didn’t get much of a gap.
"When Bahrain-Merida started to chase I just went in time-trial mode to try and have the biggest gap for the last climb. But it wasn’t enough to fight for the stage win. So onto the next one.”
De Gendt was also active during the break, sweeping up the majority of the mountains classification points before he was absorbed by the chasers.
Stage 15 is the third consecutive summit finish, a 178.2km route from Ribera de Arriba to Lagos de Covadonga, a mountain which has proved decisive in determining the Vuelta winner on several occasions and where Quintana triumphed on the way to his overall victory in 2016.
"Tomorrow (at Lagos de Covadonga) is a different kind of effort," Yates said. "I prefer longer climbs because on efforts like today you're always at the limit. If I have the same legs tomorrow I’ll be happy."