Fletcher pounced to score from close range when Rovers goalkeeper Steve Mildenhall spilled a right-wing cross from Lanre Oyebanjo.
Ryan Jarvis had put York in front after 35 minutes, shooting home from close range after Chris Smith had climbed bravely to beat Mildenhall to a Josh Carson free-kick.
But the lead lasted only a couple of minutes before indecisive York defending inside their own box allowed Eliot Richards to poach an equaliser with a low drive.
Carson then lit up the game with a superb dipping volley from 30 yards in the 41st minute to give the visitors the advantage at the break.
Matt Harrold levelled with his first touch after coming on as a 58th-minute substitute, heading in a Lee Brown free-kick and loan signing Chris Beardsley nodded the hosts in front from Michael Smith's 75th-minute cross before Fletcher had the final word.