The game appeared to be petering out into a goalless draw before Rickie Lambert’s deflected 30-yard free-kick dropped past David Forde in the 92nd minute.
But Trotter, who returned on-loan from Ipswich last week having left Millwall in 2006, fired past Kelvin Davis 30 seconds later to secure a point.
Saints started brightly and Forde had to race out of goal to swipe the ball from Lambert’s feet after the striker had been played through by Adam Lallana.
At the other end Davis produced a superb double save in the 36th minute, clawing away Alan Dunne’s 25-yard drive before climbing to his feet to deny Lewis Grabban.
Southampton lost skipper Dean Hammond to injury soon after, before the game came to life in the dying seconds with Lambert’s strike looping home and Trotter responding almost instantly.