Christophe Galtier's Nice, also in the hunt for Champions League qualification from Ligue 1, are bidding for a first major trophy since lifting the French Cup in 1997.
Most supporters would have expected the hosts, funded by British billionaire Jim Ratcliffe's Ineos company, to comfortably see off Versailles at the Allianz Riviera.
But the visitors dug deep and kept the game goalless until the 48th minute, when Nice took the lead.
Young forward Gouiri chested down a cross inside the area and lashed the ball into the top corner to score his 12th goal of the season.
Versailles continued to look dangerous on the counter-attack but the semi-final was ended as a contest by a moment of brilliance from Gouiri with 17 minutes to play.
The 22-year-old raced forwards from just inside the Versailles half, before a remarkable piece of skill took him past three defenders on the edge of the box.
He then coolly played a square pass to Kasper Dolberg and the Dutch striker stroked a low shot into the bottom corner.
Nice will face either Nantes or Monaco, who meet on Wednesday, in the final at the Stade de France on May 8.