The seventh-seeded Canadian, who hit the third-fastest serve in tournament history at 233 km/h, appeared to be cruising to victory early on as Haas managed to win just six points in the 17-minute first set. But the experienced German found his game in the third set, winning to tibreaker to make Raonic work for the victory.
Raonic said he was never concerned, despite Haas's comeback.
"I was serving pretty well," said the player from Thornhill, Ont. "That's always going to make my job a little bit easier."
Still, Raonic was impressed with the play of Haas, who at 37 became the oldest man on Monday to win a match at Wimbledon since Jimmy Connors in 1991.
"I think it's incredible what he's doing," said Raonic. "It's not just playing at 37 but playing at 37 and constantly coming back from many different things. It's a testament to the passion he has for the game and the kind of work ethic and resilience he has that makes big problems not seem too big."
Raonic, who made the semifinals at the All England Club last year, had surgery for an inflamed nerve in his right foot and missed the French Open this spring, but he won two rounds in his return to action at the recent Queen's Club event in London.
He said he's still working his way back from the injury.
"I'm doing everything I need to to be able to keep playing better and better every single match," he said, adding that he has some discomfort in his foot but "nothing out of the ordinary."
Raonic will meet Australia's Nick Kyrgios in a rematch of their 2014 quarter-final, a match Raonic won 6-7, 6-2, 6-4, 7-6 (4).
"It's going to be a good match," said Raonic. "We haven't played for a year now. I think a lot has changed on both ends. It's something I look forward to."
Raonic said he remembers some missed opportunities a year ago but feels he has improved his game since then.
"I feel like I do a lot of things better," he said. "I feel like I understand myself better. I feel like I know how to control situations better, whether that be physically or just from the mental side. So I have had a lot of experience since then. I'm just trying to make sort of the most of every opportunity."
Raonic and Vasek Pospisil of Vancouver are the lone Canadians left in the singles draw after Eugenie Bouchard made a first-round exit on Tuesday.