Carapaz stayed strong while the rest of his breakaway companions were swallowed up on the climb to win eight seconds ahead of Miguel Angel Lopez (Astana) and Primoz Roglic (Jumbo-Visma).
The Ecuadorian is in a superb run of form in the second week of the race, this victory coming just two days after he triumphed on Penas Blancas in Stage 12.
"We knew that today was a very important stage for us, that we could repeat what we did the other day," the Olympic champion said after the stage.
"The truth is that it took a long time to get away, but in the end I was there at the right time.
"I started the race with a different objective to what I have now, I had it real clear that I was here for the general classification but in the end it’s not going to happen and my teammates are much stronger. Then when we got to the mountains in Asturias it was clear that the plan was going to change a bit.
"We discussed that for me to win a stage was going to be really important. So we have focused on this and the team have really supported me and it’s special that we’ve made it, to have two victories in the Vuelta a España is really beautiful, it’s a big thing to achieve. It’s great for me, for the team, for my future, I’m a rider on a good level and to win this means a lot to me."
It was a big day for the race's general classification with Roglic dropping leader Remco Evenepoel (QuickStep AlphaVinyl) in the finale en route to regaining the 48 seconds he lost to the Belgian in Stage 10's individual time trial to move into second overall.
Evenepoel's lead is now 1 minute and 49 seconds on Roglic and 2 minutes and 43 seconds on Enric Mas (Movistar).
A furious battle for the breakaway meant it took over half the stage for one to establish, with a 10 man group going off the front with 76 kilometres to the finish.
Alexey Lutsenko (Astana Qazaqstan), Carapaz, Clément Champoussin (AG2R Citroën), Luis Leon Sanchez (Bahrain Victorious), Bruno Armirail (Groupama-FDJ), Filippo Conca (Lotto Soudal), Kenny Elissonde and Mads Pedersen (Trek-Segafredo), Raul Garcia Pierna (Kern Pharma) and Marco Brenner (Team DSM) made up the break with the task of trying to hold off the peloton on the huge climbs in the finale.
The gap was at three and a half minutes as they hit the first of the two conjoined climbs that made up the final, Pedersen the first to be dropped on the Puerto de Los Villares.
Lutsenko was the first to attack in the last 20 kilometres before Leon Sanchez countered with 10 kilometres to go as Carapaz followed, with Champoussin bridging across 3 kilometres later, the gap now at 2 minutes and 25 seconds.
Conca managed to also bridge across to the leading trio before Carapaz attacked them all to go solo inside the final 4 kilometres.
Roglic also attacked from the GC group with 4 kilometres to go with Lopez and Mas able to follow, but Evenepoel showed the first signs of struggle in the race as he was distanced quickly.
The trio gained on Carapaz but ultimately couldn't catch him as he took a famous second stage win at the race.
La Vuelta continues tonight with Stage 15, a massive 153 kilometre mountain with 4,000 metres of total climbing on the journey from Martos to the summit of Sierra Nevada. Watch the action from 9pm (AEST) on SBS On Demand before SBS coverage begins from 11:10pm (AEST).