Trailing at halftime to Thorgan Hazard's strike, Barcelona, missing the injured Lionel Messi, hit back in style.
Arda Turan leveled with 25 minutes remaining before Gerard Pique netted a late winner.
"We dominated the first half and created several chances," Barcelona coach Luis Enrique told reporters.
"We didn't carve out as many opportunities after halftime, but overall it was a deserved win."
Barcelona, which is expected to be without Messi for three weeks after the forward sustained a groin strain, has scored 20 goals in its past five matches.
This victory, which ended Monchengladbach's run of 11 consecutive home wins, leaves Barcelona with maximum points from its two games in Group C.
Celtic holds City
In the group's other game, Manchester City was forced to come from behind on three separate occasions to claim a 3-3 draw at Celtic.
City, which had won all 10 of its games under new manager Pep Guardiola, was stunned as early as the third minute when Moussa Dembele fired the Scottish champion ahead.
The visitors leveled eight minutes later through Fernandinho only for Raheem Sterling's own-goal to leave it trailing once again.
Sterling made amends with a fine equalizer but Dembele's overhead kick gave Celtic the lead for the third time just after the interval.
Celtic, beaten 7-0 in its opening game by Barcelona, desperately tried to hang onto the lead as City pushed for an equalizer.
That goal came just eight minutes later as Nolito fired home from close range after Sergio Aguero's effort had been blocked.
"It was difficult for us," Guardiola told BT Sport.
"I'm happy with the reaction from the players, it's not easy to score three goals away.
"I don't know how many the chances they had after the third goal. We should have won it."
Battle of the brothers
In Group A it was Arsenal's Granit Xhaka who came out on top against brother Taulant a
s the Premier League side won 2-0 against FC Basel in north London.
Theo Walcott scored twice to secure a comfortable victory for Arsene Wenger's side.
Arsenal leads the group ahead of Paris Saint-Germain which came from behind to win 3-1 at Ludogorets.
Edinson Cavani scored twice and Blaise Matuidi was also on target for the French champion.
Last year's finalist Atletico Madrid secured a 1-0 win over Bayern Munich thanks to Yannick Carrasco's strike.
Antoine Griezmann should have added a second but struck the crossbar from the penalty spot.
Bayern, beaten at the semifinal stage by Atletico last season, failed to find a way past a miserly home defense.
"We were aggressive and had chances but you need to take them in games like that," Bayern's Arjen Robben told reporters.
"We need to learn from this and move on."
Meanwhile, FC Rostov gained its first ever Champions League point after a 2-2 draw with PSV Eindhoven.
Dries Mertens scored twice as Napoli made it two wins from two in Group B.
The Belgium international scored twice in seven minutes with Marek Hamsik and Arkadiusz Milik also on target in the 4-2 win over Benfica.
In the night's other game, Besiktas was held to a 1-1 draw by Dynamo Kiev.