Gambhir hit 11 boundaries in his second one-day hundred, batting the last 25 minutes of his innings with a runner after suffering leg cramps in hot and humid weather.
The 25-year-old narrowly missed surpassing his previous best of 103 against Sri Lanka in 2005 when he was bowled by Syed Rasel in the 39th over, four deliveries after reaching his century.
The match was reduced to 49 overs a side as play was delayed by 30 minutes due to light morning showers.
India need a win to clinch the three-match series, the first since their first round ouster in the World Cup, where they lost to Bangladesh and eventual finalists Sri Lanka.
The tourists, who won Thursday's opening match here by five wickets, batted with aggression after captain Rahul Dravid won the toss and elected to take first strike at the Sher-e-Bangla national stadium.
Gambhir put on 43 for the first wicket with Virender Sehwag (21) and 87 for the second with Mahendra Dhoni.
Dhoni, who hit a match-winning 91 on Thursday, made 36 before he became the first of left-arm spinner Mohammad Rafique's three victims.
Left-hander Yuvraj Singh smashed a quickfire 24 off 22 balls during a third wicket stand of 44 with Gambhir to propel India to 174 for 2 by the 32nd over.
India lost four wickets in the last six overs, but Dravid remained unbeaten on 42 to set Bangladesh a stiff target of 5.8 runs an over.
Both teams made one change from Thursday's game. Leg-spinner Piyush Chawla, aged 18, made his one-day debut for India in place of seamer Shanthakumaran Sreesanth.
Pace spearhead Mashrafe Mortaza returned for Bangladesh after missing the previous match with a back strain. He replaced seamer Shahadat Hossain.
India 284 for 8 in 49 overs (Gambhir 101, Dravid 42 n o, Dhoni 36, Yuvraj 24, Sehwag 21, Mongia 16; Rafique 3 for 59, Rasel 2 for 49, Razzak 2 for 59) Vs Bangladesh (yet to bat).