The hosts, who drew 13-13 in France last week, sailed into a 17-0 lead but saw Bayonne gradually claw back the deficit to just four points before Masi crossed the line to calm the home fans' nerves.
Three Stephen Jones penalties and a try from Elliott Daly put Wasps 14-0 up inside the opening half-hour, and a penalty from Daly extended their lead before Joe Rokocoko's converted try on the stroke of half-time gave Bayonne hope.
Jones and Jacques Louis Potgieter exchanged penalties early in the second half before another Potgieter penalty hauled Bayonne back to just 20-16 down with 20 minutes left on the clock.
Billy Vunipola's sin-binning in the 62nd minute threatened to cost Wasps dear but Masi's try in the 73rd minute put the hosts firmly back in command and Nicky Robinson's subsequent conversion extended their lead back to 11 points.
Robinson kicked another penalty three minutes from time to put the gloss on a fine win for Wasps, which moves them five points clear of Bayonne at the top of their group with four games played.
In the night's other match, Stade Francais beat Italian side I Cavalieri Prato 29-6 at the MMArena in Le Mans.
The French side consolidated their position as Group Five leaders with the victory, which brought a bonus point thanks to their four-try tally.
The second match of the pool will be contested between London Welsh and Grenoble on Saturday.
- Sports & Recreation
- Jacques Louis Potgieter