Jake Cassidy, on loan from Wolves, looked to have earned all three points for Rovers at Broadhall Way on Saturday when he headed home with 12 minutes to go.
But Cassidy's 11th goal of the season was not enough to see off their promotion rivals as Tansey fired home from the edge of the area in the 92nd minute.
With 15 minutes gone, Cassidy nipped in to round goalkeeper Steve Arnold, but Bondz N'Gala came to his side's rescue with a crucial block.
On the half-hour mark, Tansey forced Owain fon Williams into a smart stop as his low drive was palmed round the post.
After the break, Andy Robinson curled a measured effort inches wide of Arnold's left-hand upright. But the visitors went ahead in the 78th minute after Adam McGurk's right-wing cross allowed 19-year-old Cassidy to head home.
Robin Shroot hit a post in the dying minutes before Tansey popped up with the last-gasp leveller.