Chile dominated an entertaining, but goalless, first half as Eduardo Vargas saw his strike ruled out by the video assistant.
The Copa America champions had to wait until the 81st minute though to find a breakthrough, which was provided by a flying header from Bayern Munich midfielder Vidal.
Vargas, who missed a host of earlier chances, added a second in added time after another video review.
The victory gave Chile a perfect start to their maiden Confederations Cup campaign, after they qualified by successfully defending their Copa America title last year.
Reigning World Cup-winners Germany and Australia make up Group B, and they go head-to-head on Monday.
The South Americans made a blistering start and almost took the lead inside the first minute, but striker Vargas’ shot crashed back off the post, before Jose Fuenzalida saw his low effort well saved by Cameroon keeper Fabrice Ondoa just seconds later.
The Africa Cup of Nations holders did look a threat on the counter-attack and Vincent Aboubakar was denied by the legs of Johnny Herrera, who was in the Chile goal ahead of usual captain Claudio Bravo.
Ondoa was the busier of the two keepers in the first half though and he had to be alert to keep out Edson Puch’s long-range strike.
The best chance of the opening 45 minutes fell to Vargas after he was played through by Vidal’s pass, but he blazed over.
Controversy reigned on the stroke of half-time at the Otkrytiye Arena as Vargas saw his stoppage-time goal ruled out.
The 27-year-old clipped the ball home, but over a minute after the ball had hit the net, the video assistant adjudged the Tigres forward to have been marginally offside.
Alexis Sanchez, who had been struggling with an ankle injury before the game, was introduced by coach Juan Antonio Pizzi 12 minutes after the interval as he looked for the 38th international goal that would make him Chile’s outright record scorer.
Cameroon were much-improved in the second half as they gained a measure of control, but Benjamin Moukandjo could only curl a free-kick wide.
Vargas continued to see chances come and go, with his latest effort being deflected behind for a corner.
That set-piece almost saw the deadlock broken, but Mauricio Isla flicked a header past the far post with the goal gaping.
Sanchez made a difference as Chile finally forged ahead with nine minutes to play.
The Arsenal forward’s dinked cross was met by Vidal, whose powerful header gave him a 23rd goal for his country.
Sanchez should have broken the record, but saw his shot blocked after rounding Ondoa, only for Vargas to poke in the rebound.
After the game’s second review, the goal and three points for Chile were confirmed.
Download our app and read this and other great stories on the move. Available for Android and iOS.