I think that the point about 31 Bg7 is that the e pawn was already undefendable and all it does is to put white's bishop out of play.
The problem with 31.. Re6 is that it doesn't take advantage of the fact that white was choosing to play without his bishop and had given black a freer hand on the queen side to win white's a pawn and get the then passed a pawn moving.
What can white do to stop this with his bishop out of play? Not much.
This game was played at an other site. Computer analysis of the game claims that black makes a mistake on move 31 playing a rook move that wins a pawn immediately instead of playing the rook on the open b-file ( which the engine thinks is a better move in the long term ).
Now, there was a discussion of this game at this site in which black claims that 31. ... Re6 was not only not a mistake, but indeed a winning move. In the game the rooks were traded which is a trivial win for black, but black in the debate presented a continuation in which Stockfish plays the position against itself ( of course it refuses to trade rooks ) and still after making cca. 40 moves resigns with white.
I wonder what you think of the position in the diagram, is this indeed a win for black? ( On the surface it seems that a rook endgame with only one pawn down can be held, but is this position special in any way? )