United generally looked the better side across the 90 minutes and 18-year-old Gomes ensured Ole Gunnar Solskjaer's men made it two wins from as many matches in the ICC with a lovely goal towards the end.
Martial's pace worried Spurs throughout the first half and, after hitting the post early on, he converted in the 21st minute to leave Paolo Gazzaniga questioning himself.
A raft of substitutions at the interval unsurprisingly upset the flow of the game, though Spurs were able to make an improvement and they restored parity through Lucas Moura's deflected effort just past the hour, with United losing Bailly to an apparent knee injury shortly before.
Gomes secured the points for United after a clever exchange with Juan Mata 10 minutes from time, continuing the side's encouraging pre-season form.
United looked the more promising in the early exchanges and went desperately close to the opener when Daniel James latched on to a loose ball and fed Martial, whose left-footed strike came off the right-hand post.
Spurs responded by crafting a chance of their own, but Dele Alli's finish after a well-worked move was feeble, allowing David de Gea to make straightforward save.
Martial capitalised on his next opportunity, though, racing on to Andreas Pereira's pass into the area and his effort from a tight angle inexplicably found its way past Gazzaniga in the Spurs net.
United changed their entire starting XI at half-time and Spurs made a host of alterations of their own, resulting in a less cohesive beginning to the second period.
Among those introduced was defender Bailly, but he lasted only 10 minutes before appearing to suffer an injury to his right knee when attempting to block a Son Heung-min effort.
We're forced into a change early in the second half: Axel Tuanzebe is on to replace @EricBailly24, who was stretchered off a short while ago.— Manchester United (@ManUtd) July 25, 2019
Speedy recovery, Eric #MUFC #MUTOUR #ICC2019 pic.twitter.com/UD4mRZBHTv
Spurs then equalised with 65 minutes on the clock – Lucas bringing the ball down brilliantly on the edge of the box, before seeing his scuffed effort deflect just past the helpless Sergio Romero.
But Solskjaer's side clinched victory late on, as Gomes played a one-two with Mata and then produced a composed finish from a tight angle to cap a solid cameo from the teenager.