Ashley Worsfold opened the scoring just after the break before Gavin Rothery sealed the win with a late tap-in.
It was a much better display from the Blues and one that put to bed the three defeats in a row.
The Blues were defensively sound and finally got that rub of the green in front of goal that Trinity boss Roma said ‘would even itself out over the season’.
Trinity made one change to the side which fell to a 2-0defeat to Harrogate on Tuesday night.
In came midfielder Alex Wiles into the centre of midfield in place of Jake Scott , who had to come off though injury in the first half against Town.
Both sides started rather shakily after the defeats in midweek with misplaced passes being the common theme for the opening 20 minutes.
The visitors arguably should have been ahead by then though as Damien Reeves glanced a header wide when unmarked in the area.
The luck in front of goal still had not moved into the positive though for Trinity, especially when Adam Quinn’s thunderbolt of a volley was blocked by Wiles when it was arrowing into the net.
Despite this the Blues’ build-up play was very positive, with Nathan Jarman and Ashley Worsfold linking up very well.
The latter came close with a low shot after Jarman produced a neat flick to open up the Robins defence.
Winger Jordan Thewlis looked lively once more, turning the visitors left back inside out at times.
He produced a comfortable save out of Andrew Dawber after executing a neat Cruyff turn on the byeline.
Trinity could not take advantage of all the positive work they were putting in and were almost caught out by the outrageous when James Lawrie tried to beat Jonathan Hedge from the halfway line, with the result too close for comfort.
The Blues arguably would not have wanted the break after their first half performance but they managed to step it up a gear and were rewarded eight minutes into the second period.
Thewlis controlled a deep cross to set up Wiles who’s shot ended up being the perfect pass for Rothery.
Rothery managed to turn the ball goalwards and it squirmed out of the reach of Dawber and Worsfold prodded home his first in a Trinity shirt.
It was just what Trinity deserved and they ran out the remaining half relatively comfortably thanks to excellent performances by Ioan Evans and Quinn at the heart of the Blues defence.
The Robins did threaten the Gainsborough goal passed the hour mark. Firstly a cross fell at the feet of Heathcote and he could not rearrange them quick enough before poking over.
Four minutes later, Reeves managed to turn Quinn in the box with the finish floating well wide.
The pace of Thewlis kept the Altrincham defenders engaged in the second half with the former Harrogate jinking around a couple of them and setting up Rothery to shoot on target.
The game was won though with six minutes to go when substitute Jacob Hazel pounced on a defensive error, marauded into the box and squared Rothery to seal the three points.
Gainsborough Trinity: Hedge, Picton, Lacey, Thornhill, Quinn, Evans, Thewlis (Bailey-King 79), Wiles, Worsfold, Jarman, Rothery. Subs not used: Beatson, Hazel, Reid, Eastwood.
Altrincham: Dawber, Patterson, Sumner, Cyrus, Heathcote (Richman 63), Goodall, Lawrie, Moult, Bell (Menagh 63), Reeves, Lynch (Hattersley 82). Subs not used: Joyce, Preston.
Referee: Marc Edwards.