Gayle slammed 117 off just 57 balls, with a record 10 sixes, as West Indies posted a challenging 205 for six after being sent in to bat in the Group A match.
But Herschelle Gibbs put on 54 off 37 balls with captain Graeme Smith (28) for the first wicket before he and Justin Kemp guided South Africa to a comfortable victory with 14 balls to spare.
Gibbs batted with a runner but it had no effect on his dazzling strokeplay as he blazed 90 not out off 55 balls, with 14 fours and two sixes, as he and Kemp added 120 in 9.2 overs.
West Indies gave Gibbs a costly chance on 43 when Shivnarine Chanderpaul dropped him on the boundary off the bowling of Dwayne Bravo and their bowling was also profligate.
Kemp cruised to 46 not out off 22 balls with five fours and two sixes.
Earlier, South Africa had gone wicketless until the 14th over as Gayle and Devon Smith put on a record opening stand of 145 off 86 balls. Smith was eventually caught behind off a cramped slash off Vernon Philander for a run-a-ball 35 that included just three boundaries.
The left-handed Gayle preferred the aerial route, hitting just seven fours, but his 10 sixes doubled the record of five shared by Australians Ricky Ponting, Damian Martyn and Adam Gilchrist. Ponting had come closest to registering a century with his 98 not out against New Zealand in Auckland in 2004/05.
Gayle was eventually dismissed in the 17th over when an attempted hook off Johan van der Wath went straight up in the air, gifting wicketkeeper Mark Boucher with a second simple catch.
Batsmen came and went regularly after the record opening stand, the highest for any wicket in Twenty20 internationals. It beat the mark of 132 unbroken between South Africa's Graeme Smith and Loots Bosman when they opened the batting against Pakistan in Johannesburg earlier this year.
South Africa's bowlers had little to cheer about early on, but came back well to limit West Indies to 38 runs in the last five overs with Van der Wath taking two for 33 and Morne Morkel one for 30 in their four-over spells.