The game was staged to celebrate the Glasgow club's 150th anniversary.
Alex McLeish took to the dugout as Rangers' manager.
Giovanni van Bronckhorst, Jorg Albertz, Barry Ferguson and Ronald De Boer were all in the squad alongside Gazza.
The World XI team was captained by Luis Figo.
It also featured Kaka, Claude Makelele, Eric Abidal, Gheorge Hagi and Robert Pires.
Rangers took the lead on 39 minutes thanks to an emphatic header from Shota Arveladze.
Carlos Marchena equalised early in the second half, heading home on the end of a beautiful ball from Kaka.
Nuno Gomes made it 2-1 to the World XI before Ricardo Quaresma added a third with a stunning strike.
Quaresma rolled back the years to finish with the outside of his boot in classy fashion.
Then came Gazza's moment.
The ball was rolled across the box to the England icon, who totally miscued his strike and put his hands on his head.
One of the World XI defenders reacted by generously playing the ball back to him.
Gascoigne scuffed a second shot, which bobbled over the line as the World XI keeper dramatically dived over it.
The celebrations were heartwarming as the entire stadium rose to its feet to applaud a true legend of the game.
The match finished 3-2.