Rovers equalised on 32 minutes through Paul Gallagher but Boro won the game courtesy of Graham's second goal of the night with just eight minutes remaining and Rovers down to ten men.
Rovers defender Craig Barr was adjudged to have brought down Anthony Peacock in the box and Graham scored from the resulting penalty kick.
Midfielder Robbie Savage, playing his first competitive match for five weeks, completed 70 minutes whilst Jerome Watt and Jemal Johnson both limped out of the game with injuries after Rovers had used their three subs.
Rovers: Drench, Kane, Amoruso (Barr, 46), Short, Taylor, Watt (Hodge 56), Savage, Harkins, Gallagher, Johnson (Weaver, 61), Derbyshire. Subs not used: Fielding, Woods.
Middlesbrough: Knight, Hines, Grounds (Cattermole, 60), Kennedy, Ehiogu, Wheater, Peacock, Taylor, Graham, Craddock, Johnson. Subs not used: Pennock, Clough, Burgess, Owens.