The three-time grand slam winner made his tour return last month after requiring two surgeries on a left foot injury, but rallied after losing his first set against Opelka to secure a memorable 3-6 7-5 6-2 first-round victory.
Speaking after booking a second-round meeting with Laslo Djere, who beat Borna Coric 6-2 6-7 (3-7) 6-2, Wawrinka said his desire to play at the top level never left him, despite his injury woes.
"I think in general I was feeling good on the court, physically I was feeling great," he said. "For sure, when you don't win a match in more than a year, you start to think about it more than you should and not focus on the right things.
"In general, I think it was a great match, a great battle. I stayed positive. I started to feel much better with my tennis by the end of the second set, and in the third set. I'm really happy with this victory.
"After two surgeries, at my age I could easily have stopped playing because my career is way better than what I expected when I was young.
"But I still have this fire in me. I still believe that I can play great tennis. I still believe that I make some big results, maybe not now, but in a few months."
Fellow former grand slam champion Dominic Thiem, who also returned from a long injury-enforced absence last month, fared less well, going down in straight sets to Fabio Fognini.
Having lost to Andy Murray at the Madrid Open last time out, 2020 US Open winner Thiem is still chasing his first victory of the year after losing 6-4 7-6 (7-5) to the 34 year-old Italian.
Elsewhere, 13th seed Denis Shapovalov edged an epic three-hour contest against Italy's Lorenzo Sonego 7-6 (7-5) 3-6 6-3, responding after being handed a game penalty for shouting expletives at a partisan crowd in Rome during the second set.
The frustrated Canadian was heard to tell spectators: "Shut the f*** up" when being booed after complaining about a second serve being called out by the umpire, but eventually regained his composure to claim a three-set win.
Shapovalov will face Georgia's world number 25 Nikoloz Basilashvili in the second round after he overcame Daniel Evans 7-6 (7-2) 6-2, while the only other seed to play on Monday, Spain's Pablo Carreno Busta, cruised to a 6-3 6-2 victory over Federico Delbonis.