Dom Telford seemingly came off the bench and netted the winner in Lee Brown's final game for Rovers, but for a stoppage time equaliser from Gillingham's Elliot List.
In the build-up to the game, Rovers boss Darrell Clarke opted to make just one change to the side that faced Wigan just four days prior.
That change came in the shape of Tom Nichols replacing Ollie Clarke.
In his final outing in the blue and white quarters, Lee Brown was handed the captains armband for the fixture and there was a fitting moment of appreciation around the Mem when clock entered the third minute.
Rovers started the game in a promising fashion. An early ball carved into the area by James Clarke arrived at the feet of Ellis Harrison at the near post, but with the ball reaching the striker at speed, he was unable to arrange his body to deliver a first-time shot towards goal.
Harrison's opportunity was the closest the game came to lending an opportunity inside the opening twenty minutes, as both sets of defences stood firm to any endeavour.
Tom Nichols injected a life into the game midway through the first-half, as the striker unleashed a fierce shot from range that bounced agonisingly close wide the upright.
There was a scare for Rovers as the encounter approached the half-hour mark, as a curling shot from Tom Eaves bounced back off the crossbar and fell kindly for Lee Martin to tap home from close-range. As the Gillingham skipper wheeled away in celebration, he was instantly greeted by the linesman's flag and the goal was ruled out.
As half-time approached, a chipped ball into the area by Kyle Bennett was flighted into the direction of Tom Nichols, who narrowly missed out on glancing a header towards the target, while Ellis Harrison almost took advantage of a defensive mix up, but dragged an effort wide while off-balance.
There was a brighter start to second half, as Byron Moore set James Clarke to bullet a dangerous cross from the right, as the delivery was deflected clear from Ellis Harrison at the near post. The half-chance was followed by a low shot from range from the Liam Sercombe that Tomas Holy saved down low, as the 'keeper stretched to his right to make a routine save.
Rovers continued to ask questions, as an expressive passage of play on the edge of the area saw the ball drop kindly for Liam Sercombe to unleash a volley towards goal. The midfielder waited patiently for the ball to a comfortable height and connected well with his volley, but his effort cannoned into Ellis Harrison and behind for a goal kick.
There was an anxious moment at the other end, as Lee Martin stormed through a congested penalty area to meet a Luke O'Neill set-piece, but after arriving at the ball the Gillingham captain could only divert his powerful header high over the crossbar.
Martin's opportunity was quickly followed by a deflected shot from range by Callum Riley, as a brave touch from Tom Lockyer changed the path of the attempt away from danger.
On the hour mark, Rovers made a double change, as Rory Gaffney and Dom Telford were introduced in a like-for-like swap for both Harrison and Nichols.
The two substitutes combined almost immediately, as Gaffney knocked down a header inside the area to Telford, but snatching at a volley the Stoke loanee could only fire his attempt into the side-netting.
Telford again looked lively when receiving the ball in a wide position, as a turn of pace set the striker to launch a cross from the left that was meant for the far-post, but the delivery was claimed by Holy.
Rovers' final change saw Ryan Broom replace Byron Moore, as the winger marked a return from a successful loan spell at Eastleigh.
Inside the final ten minutes, Sam Slocombe was called into action, as the Rovers 'keeper showed a strong hand to deny a powerfully struck effort from Lee Martin, who had managed to fire on goal from inside the Rovers area.
Rovers created another chance and it proved pivotal, as Dom Telford got on the end of a smart Lee Brown cut-back to poke home a header after his initial effort was somehow saved by Tomas Holy.
However, Gillingham had a super-sub of their own as List came off the bench to net a scrappy equaliser in the 93rd minute.
Rovers conclude their SkyBet League One campaign next weekend at Southend.
Rovers XI: Sam Slocombe (GK), James Clarke, Tom Lockyer, Tony Craig, Lee Brown (c), Byron Moore (73' Ryan Broom), Liam Sercombe, Chris Lines, Kyle Bennett, Tom Nichols (58' Dom Telford), Ellis Harrison (58' Rory Gaffney).
Subs: Adam Smith (GK), Rory Gaffney, Ryan Broom, Dom Telford.
Gillingham XI: Tomas Holy (GK), Luke O'Neill, Bradley Garmston, Max Ehmer, Gabriel Zakuani, Scott Wagstaff, Tom Eaves (73' Elliot List), Lee Martin, Josh Parker (67' Conor Wilkinson), Callum Reilly, Mark Byrne.
Subs: Tom Hadler (GK), Jake Hessenthaler, Connor Ogilvie, Ben Nugent, Navid Nasseri.