Bale had scored or assisted nine of the 11 Wales goals in qualifying and the Real Madrid forward seemed to have made the difference for his team once more.
But substitute Ondrej Duda had other ideas, shooting low past Danny Ward after superb work by Robert Mak early in the second half.
Another substitute then struck the decisive blow with 10 minutes to go as Robson-Kanu bundled in an untidy finish after Aaron Ramsey created the opening.
Slovakia’s unbeaten run ends at eight games as a result of their defeat, with Russia up next for Jan Kozak’s side, while Wales will be buoyed ahead of their clash against England in Lens on Thursday.
All the pre-match build-up had focused on Bale against Hamsik, and it was the Slovakia star who was first to threaten with a brilliant solo run inside three minutes.