Alcaraz was two points away from losing at 4-5, 15/30, and 5/3 in the tie-break, where he trailed by a mini-break on both occasions.
Alcaraz has won three ITF Men's World Tennis Tour titles and four ATP Challenger Tour titles since turning professional in 2018.
The three-time BNP Paribas Open champion beat his fellow Spaniard 6-4, 4-6, 6-3 to reach his fifth final in the California desert.
Alcaraz is now the tournament's second-youngest semi-finalist, trailing only Andre Agassi, who was also 17 at the time.
Alcaraz reached the No. 22 spot in the world as a junior and won two titles on the International Tennis Federation (ITF) junior circuit.
Carlos Alcaraz became the youngest player since 2009 to win an ATP 500 event with his win in the Rio Open final.
The Spaniard bettered the record of Roger Federer, Rafael Nadal and Novak Djokovic at a Grand Slam event.
Alcaraz will make his debut in the competition, and he will be joined by Roberto Bautista Agut, one of the heroes of the 2019 World Cup