The Swiss fourth seed prevailed 7-6 (7/2), 6-4, 4-6, 7-6 (10/8) in just over three hours and will play Japan's Kei Nishikori in the last eight.
Garcia-Lopez, who knocked Wawrinka out in the first round at last year's French Open, had four set points at 6-2 in the tiebreaker to take the match into a fifth set before the defending champion clawed back.
Wawrinka held match point at 7-6 before the Spaniard got a fifth set point only to again be denied. The Swiss then clinched it on his second match point.
Wawrinka looked to be travelling to a straight sets victory after winning the first two sets and up a break in the third, before the Garcia-Lopez fightback on Margaret Court Arena.
"That was a really tough battle today," Wawrinka said.
"I was up two sets and a break after it was really tough to get the first set," he said.
Wawrinka said he was happy to get through after three hours.
"It was a good level and it's good to make one more round," he said.
"We have already played a big match at the French Open and it's always tough to play him, he plays with a good rhythm and he puts a lot of pressure on you from the baseline, but I served well."
Both players got four service breaks each, while Wawrinka hit 70 winners and made 61 unforced errors.
He served at 63 percent and won 76 percent of his first serves.
Japanese superstar Nishikori swept into the last eight on Monday to tee up the pivotal match with Wawrinka.
Nishikori had a relatively comfortable win over Spanish terrier David Ferrer to advance to his third Grand Slam quarterfinal.
The US Open finalist won 6-3, 6-3, 6-3 in two hours, seven minutes at the Rod Laver Arena and will now play Wawrinka for a place in the semifinals.