They surpassed the previous record of 263-5, set by Royal Challengers Bangalore in 2013
Marcus Thuram fired in for the lead with the hosts' first chance of the game in the 33rd minute and tapped in on the rebound in the 58th just as Real were pushing for an equaliser.
But Karim Benzema cut the deficit in the 87th minute and Casemiro got the equaliser in stoppage time.
The 13-time European champions, who had lost their previous three games following last season's two defeats to Manchester City in the knockout stage and their shock 3-2 loss to Shakhtar Donetsk last week, earned their first point in the competition.
Gladbach are in second place on two points, with Shakhtar top on four after a 0-0 draw with Inter Milan.