Rangers had to fight back to stay level on points with Celtic. Gerrard rotated his squad by making four changes to the team which played at Porto in the Europa League and he nearly paid the price for it.
Motherwell went ahead after 20 minutes. Devante Cole scored despite McGregor's best efforts to keep the shot out.
The home side struggled to draw level , but they did so at a very crucial time of the game: just before half-time. Defoe, who is still scoring plenty of goals, equalised just minutes after Rangers missed a penalty.
Rangers dominated the second half, but they could not break down a well ordered Motherwell defence. Time was ticking and nerves set in at Ibrox.
However, just ten minutes from time, Rangers scored the winner thanks to Filip Helander who took advantage of a good move by Tavernier to head home and make it 2-1.