"main seating for spectators at an outdoor event," 1761 (two words), from grand (adj.) + stand (n.). The verb meaning "to show off" is student slang from 1895, from grandstand player, attested in baseball slang from 1888.
It's little things of this sort which makes the 'grand stand player.' They make impossible catches, and when they get the ball they roll all over the field. [M.J. Kelly, "Play Ball," 1888]
Compare British gallery hit (1882) "showy play by a batsman in cricket, 'intended to gain applause from uncritical spectators'" [OED]. Related: grandstanding.