Spanish great Nadal and long-time friend Marc Lopez defeated Romania's Florin Mergea and Horia Tecau 6-2, 3-6, 4-6 in the men's doubles title match.
Nadal, the 2008 singles champion in Beijing, is just the fourth player to win gold in singles and doubles after Serena and Venus Williams and Chile's Nicolas Massu.
Earlier, the 30-year-old defeated Brazil's Thomaz Bellucci 2-6, 6-4, 6-2 in the singles quarter-finals.
He faces Juan Martín Del Potro of Argentina on Saturday for a place in the final.
Del Potro, the 2009 US Open champion who was pushed to the brink of retirement by years of wrist trouble, downed Spain's Roberto Bautista Agut 7-5, 7-6 (7/4).
The Argentine, who knocked out world number one Novak Djokovic in the first round, wept in his courtside chair at the end of the quarter-final in which he fired 42 winners.
Also Read: Rio Olympics: Stunning Michael Phelps, Joseph Schooling wins Singapore’s first gold
Defending champion Andy Murray will face Japan's Kei Nishikori in the other semi-final.
In the women's singles, Monica Puig made Saturday's final where she will play Germany's Angelique Kerber for the chance to win Puerto Rico's first Olympic gold medal.
"Being in the singles semi-finals is something that a few days ago I wouldn't even imagine," said Nadal, who is playing in his first tournament since the French Open two and half months ago where he suffered an injury to his left wrist.
"I don't even know how things are going so well because I didn't do any preparation for the tournament."
Del Potro, meanwhile, has seen his ranking slip from four in the world to 141 after undergoing three surgeries in recent years and missing large parts of the last two seasons.
"Every time I play here, the crowd makes me cry," said the 2012 bronze medallist who once again enjoyed the support of a legion of boisterous fans wearing Argentina football shirts.
Second seed Murray battled through a second successive three-setter to reach the semi-finals with a 6-0, 4-6, 7-6 (7/2) win over Steve Johnson of the United States.
Murray finished with 31 winners but also 36 unforced errors.
"I expected a tough match. The court is very lively, there's a lot of wind, so it makes it hard to play," said Murray.
He'll face Nishikori who saved three match points to defeat France's Gael Monfils 7-6 (7/4), 4-6, 7-6 (8/6). Monfils double-faulted on his final match point in the final set tie-breaker which he led 6/3 at one stage.
"I had nothing to lose from 6-3 down and I knew that my concentration wasn't there at the beginning of the tiebreak, so I tried to play a little more aggressive," said the Japanese star.
It was weirdly familiar for Monfils who squandered five match points against Nishikori in Miami.
Puig, 22, reached the women's final and is already guaranteed at least a silver -- only her country's ninth Olympic medal.
She reached Saturday's final by beating two-time Wimbledon champion Petra Kvitova 6-4, 1-6, 6-3 in a roller-coaster match which featured 10 breaks of serve.
Puig, the world number 34, will face German second seed, and Australian Open champion, Angelique Kerber for the title.
Kerber downed American seventh seed Madison Keys 6-3, 7-5, reaching the final without dropping a set.
"It would be unbelievable to win the gold and it would be the biggest honour in the world," said world number 34 Puig.
"But the Olympics isn't about me, it's about Puerto Rico and I know how bad they want this."
Nadal had planned an assault on three golds in Rio but his gruelling schedule finally caught up with him and he decided to scratch from the mixed doubles with Garbine Muguruza.
Murray's hopes of a golden double were dashed when he and partner Heather Watson lost 6-4, 6-4 to Sania Mirza and Rohan Bopanna of India in the mixed doubles quarter-finals.