The BMC rider was off the leash for the 4th stage after a crash on Stage 3 cost him almost 16 minutes on the general classification.
Sitting 104th in the standings and no longer in contention for the overall, the stage from Tona to La Molina was the perfect place for the American to remind his rivals that he remains a threat in the Grand Tours.
Van Garderen finished three seconds ahead of Porte (Sky) on the stage and eight in front of Tinkoff-Saxo's Alberto Contador.
While those three big names hogged the limelight on the stage, Lotto-Suodal's Bart De Clercq quietly crept into the overall lead after another steady ride saw him finish in 19th place and just 47 seconds behind van Garderen.
De Clercq was one of several riders who made the winning break on the first stage to finish third overall and is the only rider from that group who has managed to not only defend his position but profit from it.
He replaces Pierre Rolland (Europcar) at the head of the general classification and now has a 21 second lead on Porte and 26 seconds on Stage 3 winner, Domenico Pozzovivo (AG2R).
"Before the start of this race I had never thought I would wear the leader's jersey after the fourth stage," De Clercq said.
"In the first stage the peloton gave the break I was in a big advantage, but now I will do all I can to grab this opportunity with both hands.
"Yesterday I was angry at myself because I had lost contact with the first group in the descent and lost precious time. That's why I was 100 percent motivated to set things straight in the queen stage.
"I climbed well, I could maintain a position in front, also on the climb of 21 kilometres I kept riding in tenth to fifteenth position. When the tempo was raised, Rolland was dropped, but I could follow.
"On the last climb there were attacks, as expected. I hung on to the same tempo and that way I could control the damage."
But the stage belonged to van Garderen who needed a decisive ride after looking like he was not going to be seriously competitive with the best of his contemporaries this season.
"I have very good memories of this race from last year," van Garderen said. "I have an up-and-down relationship with this race. It was an unfortunate event yesterday with the crash. Luckily, I came away with minimal damage."
"I was really motivated for today. I changed the tactic from trying to go for the classification and put everything into the stage. That was all I had in my mind today."
Van Garderen made the winning move on the final climb after the last two riders from the day's breakaway were overtaken by Vasil Kiryienka (Sky) with five kilometers to go in the 188.4km stage.
He counter-attacked a move by Dan Martin (Cannondale-Garmin), then caught and passed Kiryienka before holding off Contador and Porte.
Stage 4: 188.4km, Tona - La Molina
1 Tejay Van Garderen (USA) BMC 5hr 00min 36sec
2 Richie Porte (AUS) Sky 0:00:03
3 Alberto Contador (ESP) Tinkoff-Saxo 0:00:08
4 Daniel Martin (IRL) Cannondale-Garmin
5 Wilco Kelderman (NED) LottoNL-Jumbo
6 Darwin Atapuma (COL) BMC 0:00:11
7 Domenico Pozzovivo (ITA) AG2R 0:00:15
8 Alejandro Valverde (ESP) Movistar 0:00:19
9 Vasil Kiryienka (BLR) Sky 0:00:21
10 Rafael Valls (ESP) Lampre-Merida
1 Bart De Clercq (BEL) Lotto-Soudal 18hr 32min 02sec
2 Richie Porte (AUS) Sky 0:00:21
3 Domenico Pozzovivo (ITA) AG2R 0:00:26
4 Daniel Martin (IRL) Cannondale-Garmin 0:00:27
5 Alberto Contador (ESP) Tinkoff-Saxo 0:00:28
6 Rigoberto Uran (COL) Etixx-QuickStep 0:00:45
7 Fabio Aru (ITA) Astana 0:00:48
8 Wilco Kelderman (NED) LottoNL-Jumbo 0:00:51
9 Alejandro Valverde (ESP) Movistar 0:00:52
10 Darwin Atapuma (COL) BMC 0:00:54