The West Indies opener hit two sixes and six fours as Bangalore achieved a rain-revised target of 102 with three balls to spare in a 13-overs-a-side game to make sure of a place in the semi-finals.
Gayle started aggressively, hitting Australian paceman Brett Lee for four boundaries in the opening over and then cracking two successive sixes in the next over bowled by seamer Jaidev Unadkat.
He fell in the third over attempting a big shot, caught by Jacques Kallis off Lee. Kallis took two wickets for 16 runs in three overs.
Yusuf Pathan earlier top-scored for Kolkata with 36, adding 53 for the fourth wicket with Manoj Tiwary (19 not out). He hit three sixes and two fours in his 24-ball knock.
Bangalore lead the 10-team league table with 17 points.
Kolkata Knight Riders 89-4 in 13 overs (Y Pathan 36; C Langeveldt 2-10) lost to Royal Challengers Bangalore 105-6 in 123 overs (C Gayle 38; J Kallis 2-16) by four wickets (D/L method)