Playing their first game at a major championship since the 1958 World Cup, Wales took a 10th-minute lead courtesy of Gareth Bale’s fine free-kick, only for Slovakia substitute Ondrej Duda to equalise.
But with nine minutes remaining, Robson-Kanu, released by Reading at the end of the season, scuffed a shot past Matus Kozacik to send Chris Coleman’s side striding towards the last 16.
His strike ended Wales’s four-game winless run and tees the European Championship debutants up perfectly for Thursday’s hotly anticipated second Group B fixture against neighbours England in Lens.
Jan Kozak’s Slovakia, previously unbeaten in eight games, tackle Russia in Lille on Wednesday knowing that a second defeat could be fatal.
When Bale’s moment arrived 10 minutes in, there was to be no such reprieve for Slovakia.
Presented with a free-kick 30 yards from goal, he slammed the ball over the wall and as Kozacik moved to his left, it darted in the other direction and plunged low into the net.
Slovakia coach Kozak sent on Adam Nemec and Duda, with Michal Duris and Patrik Hrovosky giving way, and within a minute Duda had scored, arrowing a shot past Ward’s left hand from Mak’s right-wing cut-back.
It made him the first player to score past Wales at a major tournament since a 17-year-old Pele at the 1958 World Cup.
Hamsik and Mak threatened before Coleman made a double change of his own, sending on Joe Ledley, 35 days after he fractured a fibula, and Robson-Kanu, who was to make a major impact.
After crossing for Aaron Ramsey to head over, the roles were reversed to decisive effect, the Arsenal man skipping past Skrtel and Robson-Kanu steering the ball home.
There was a late scare when Nemec wobbled the post with a header, but Wales survived.
– DANNY PHILLIPS, WALES
One man team? No chance! Wales showed what Chris Coleman seemed to have known from the off, there is a squad here and they’re not just their holidays. Of course the maestro was always going to have his moment and what a moment it was. After that it was back to game plan from qualification – press high, all across the midfield and take up a high line. For all but 20 minutes of the second-half Wales looked comfortable if not superior and after conceding went again. Finally it was time for Robson-Kanu to impact the game. There is more to come from him, mark my words. They’ll be dancing in the valleys tonight!
– JOZEF UHROVSKY, SLOVAKIA
Hamsik should have really put away the opening chance. From that moment it felt like it gave Wales a wake-up call and their defence was resilient in the first-half. I mentioned our forwards are our weakness and today was evidence of that. Momentum swung our way after the equaliser and we needed to take advantage but failed. We played too much in the middle of the park where Wales were so well structured. Unfortunately, the loss all but rules out automatic qualification and I don’t think we have the fire power to be placed in the best third spot with the likes of England and Russia still to play.