Samuel Lino cancelled out a first-half penalty from Karim Benzema to leave the two teams level at the end of extra-time, with penalties required to separate the two teams.
Carlo Ancelotti's side dispatched all four of their spot kicks, while Valencia missed two, so the reigning Spanish and European champions will take on either Barcelona or Real Betis in Sunday's final.
Rodrygo had the first opportunity of the match in the 10th minute after being found by Federico Valverde, but the Brazil international fired his effort wide of the near post.
Benzema and Valverde then came close in the 14th minute, with the former firing wide after a mazy run before the latter just missed the post from distance.
Real Madrid were awarded a penalty in the 37th minute of the contest when Eray Comert was penalised for a foul on Benzema, and the Frenchman found the back of the net from the resulting spot kick to send Ancelotti's side ahead in the last-four contest.
Valencia equalised shortly after the restart, though, with Lino converting from a Toni Lato cross to leave the two teams level at 1-1 in Saudi Arabia.
Nacho headed wide of the target in the 51st minute, as Real Madrid looked to regain the lead, but Valencia continued to defend well as the second period advanced.
Benzema had another chance in the 88th minute when Valverde delivered a cross onto the head of the striker, but his effort flew over the crossbar, with the match heading for the end of normal time.
There was another piece of drama before the end of the 90 minutes, though, with Giorgi Mamardashvili making a brilliant save to keep out Vinicius Junior's strike from close range.
Mamardashvili again denied Vinicius shortly into extra-time, before the Valencia goalkeeper kept out a strike from Toni Kroos shortly before the end of the first period.
Valencia had a golden chance to take the lead in the 111th minute when Ilaix Moriba found Francisco Perez with a clever pass, but Thibaut Courtois was on hand to make a brilliant save, and the match headed for penalties to determine which side would progress to the final.
Edinson Cavani netted his spot kick before Benzema levelled for 1-1 in the shootout; Comert then missed for Valencia, allowing Real Madrid to take a 2-1 lead through Luka Modric.
Moriba made it 2-2 with Valencia's third penalty, before Los Blancos took a 3-2 lead through Kroos.
Hugo Guillamon then levelled it at 3-3, but Marco Asensio sent Real Madrid back ahead, and Valencia missed their fifth penalty through Jose Gaya, with Ancelotti's side progressing to the final.