Edison Flores scored the decisive penalty as Peru, who were thrashed 5-0 by Brazil in their previous match, qualified for the semi-finals for the third time in the last four editions of the Copa.
And it was a remarkable turnaround for Gallese, who was the villain of that thumping by the hosts, gifting Brazil their second goal by clearing the ball straight to Roberto Firmino, while he was also partially at fault for the first and third scores
But in Salvador he guessed the right way for the first shoot-out penalty to deny Barcelona forward Suarez, after which Peru’s own penalty-takers were faultless.
It was the third Copa quarter-final to finish goalless and head to penalties after Uruguay had three goals ruled out for offside during normal time.
Giorgian de Arrascaeta, Edinson Cavani and Suarez had all put the ball in the net, only to be denied by a linesman’s flag.
Brazil beat Paraguay on spot-kicks on Thursday and champions Chile did likewise to knock-out Colombia on Friday.
In the only match to feature any goals, Argentina defeated Venezuela 2-0 on Friday.
Peru will face Chile in the second semi-final in Porto Alegre on Wednesday, a day after hosts Brazil take on Argentina in Belo Horizonte.
Copa winners in 1939 and 1975, Peru lost to Chile in the semi-finals four years ago.
After a slow opening, Uruguay burst into life on 15 minutes when Federico Valverde surged onto a loose Peru pass in their own half and picked out an unmarked Luis Suarez on the penalty spot, but the Barcelona forward couldn’t keep down his header.
Two minutes later Nahitan Nandez broke into the box from the flank but his shot was blocked by a sliding defender.
In pouring rain, Uruguay should have taken the lead on 24 minutes with a rapier counter-attack.
Suarez bundled past two defenders on the left of the box and while Gallese saved his shot, he succeeded only in pushing it out to Cavani on the edge off the six-yard box.
Uruguay’s Luis Suarez (L) -whose penalty was stopped by Peru’s goalkeeper Pedro Gallese- and Jose Maria Gimenez look on during the penalty shoot-out against Peru after tying 0-0 during their Copa America football tournament quarter-final match at the Fonte Nova Arena in Salvador, Brazil, on June 29, 2019.
Incredibly the Paris Saint-Germain marksman ballooned his shot over the bar although it wouldn’t have counted as Suarez was retroactively deemed offside when he received the ball.
Moments later Nandez headed over from six yards.
De Arrascaeta had the ball in the net on 28 minutes but that was chalked off for an offside against Nandez, who played the cross into the box.
Uruguay were well on top even though Peru were enjoying 55 percent of possession.
They finally created a worthy chance late in the first half but Jose Gimenez made a stunning recovery tackle to deny Paolo Guerrero a goalscoring chance.
Up the other end, Gallese made himself big to block Cavani’s shot on the turn.
Gallese was called into action early in the second period to punch out a dipping Valverde free-kick.
Center-back Diego Godin, up for a throw-in deep in Peruvian territory, emulated Cavani’s first-half howler, spooning over from seven yards after he was picked out by Suarez.
Cavani appeared to have broken the deadlock just before the hour mark as he latched onto a Suarez through ball and chipped Gallese, but he was pulled up for offside.
Suarez poked home a Martin Caceres cross inside the six yard box on 73 minutes, but that too was ruled offside.
Uruguay pushed hard late on but Peru held out as Suarez failed to make contact with the ball when trying to lob Gallese in the clearest chance.