The striker found the roof of the net with his right foot from substitute Andy Williams' pass as injury time approached to send Rovers fans home celebrating a fifth win in seven.
Rovers boss Trollope said: "There were many aspects of our play that weren't as we want them. We ground out a result and you have to do that sometimes.
"We've created an expectation of flowing football among our supporters and sometimes the opposition stop you playing that way.
"Oldham did that very well by closing us down at every opportunity, but I thought they might struggle to do that for the entire 90 minutes and it proved that way. We kept going until the final whistle and got our reward."