Chasing 124 for victory, India folded for 93 on a minefield of a pitch where South Africa captain Temba Bavuma scored the only half-century of the match that finished inside three days.
On an Eden Gardens surface where sharp spin and inconsistent bounce meant even the set batters could not convert their starts into big knocks, Gambhir mounted a strong defence of their choice of pitch.
"There was no demon in this wicket. It was not an unplayable one," Gambhir said after off-spinner Simon Harmer bowled South Africa to a 30-run victory in the series opener.
"This was not a typical turning track. Majority of the wickets were claimed by the seamers. It was more of a test of your technique and mental toughness ... Those who defended well scored runs.
"This is exactly what we wanted but when you don't play well, this is what happens."
Having conceded a first innings lead of 30, South Africa appeared to be staring at defeat when they resumed day three on 97-3.
Bavuma's unbeaten 55 gave their bowlers something to defend and player-of-the-match Harmer claimed four second-innings wickets to set up a memorable victory for the world test champions.
India were one batter short as skipper Shubman Gill, who retired hurt with a neck injury after making four in the first innings, did not bat in the second.
His counterpart Bavuma produced an innings of remarkable grit, forging a crucial 44-run stand with Corbin Bosch for the eighth wicket to frustrate India.
While flamboyant shot-makers from both sides struggled, Bavuma said his compact defence stood him in good stead.
"I found it a bit tricky to trust the bounce of the wicket," Bavuma said.
"Some balls were bouncing nicely, others were squatting. So that was a bit tricky, which made cross-batted shots a bit harder.
"I always back my defence and my game is that simple - I just try to play around my defence."
