There was nothing hingeing on the game with Accrington 17th and Mansfield safe in 21st place, but both sides had been on poor runs and needed an end-of-the-season boost.
Mansfield created the better chances in a first half of limited opportunities and capitalised on a short back pass in the 39th minute with Jamie McGuire volleying home from the edge of the penalty area for his first goal of the campaign.
Accrington, who had won one of their previous 13 games, must have been given some harsh words at the break from manager John Coleman as they came out with more of an attacking threat.
Within two minutes of the restart Josh Windass’s header had been superbly kept out by Mansfield goalkeeper Lenny Pidgeley, but Seamus Conneely followed-up to make it all-square.
Accrington then looked the more likely to score and eventually made their pressure count in the 71st minute when striker Gornell raced down the left wing and into the area before pushing the ball past Pidgeley for the winner.