Gainsborough fell to their first defeat in three games as a second half header from Micah Evans gave Stockport the three points in a tight and enthralling affair at the Martin and Co Arena.
Evans’ goal in the 62nd minute was enough for the visitors as goalkeeper Ian Ormson produced a string of impressive stops to earn the three points.
Ormson even defied Darryn Stamp in the late minutes with a stunning diving save as his header seemed to be flying into the top corner.
The match was a real test to see how far Trinity have come this season, with County expected to be in play off contention come April.
The Blues just could not get the ball in the net with there being little between the sides.
Stockport missed several chances themselves with none of them particularly testing Jan Budtz in the Gainsborough goal.
After wins away at Gloucester and at home to Boston in the FA Cup, manager Steve Housham named an unchanged lineup, with Jamie Yates notching his 100th league appearance for the club.
Nick Bignall was the most notable absentee as a swollen knee kept him out of the squad altogether.
A fast paced start failed to produce any clear cut chances in the opening twenty minutes despite both sides breaking forward with pace and vigour.
The visitors had the first chance after this period as left sided midfielder Joe Garvin broke into space in the Trinity half and fired over the crossbar from range.
Soon after the Blues earnt a free kick half way in the County half and a curling cross-cum-shot from Jamie Yates had to be acrobatically tipped wide.
From the corner Yates volleyed wide with a vicious curling strike.
Former Tranmere winger Abdulai Baggie was the next to try on goal as the ball fortunately broke to him on the edge of the penalty area and his weak left foot shot trickled wide.
On the stroke of half time came the best chance for either side. Nathan Jarman chipped a cross into the far post, which was not cleared. Marc Newsham managed to wrestle off his man and turn home a shot on target which Ian Ormson did well to stop low down at his near post.
There were a flutter of chances to start the second half as first Lewis Montrose headed on target for County before Baggie found himself clean through on goal and he shot straight at Jan Budtz.
It was a glorious opportunity in what was becoming an increasingly tight and tense affair.
Luckily they travelling County fans did not have to wait much longer to celebrate as Micah Evans climbed to meet a Joe Garvin cross to head Stockport in front via the post.
The Cheshire side continued to press for more goals and Kayode Odejayi volleyed over when well positioned in the Trinity penalty area, moments before heading inches wide from a Baggie cross.
Gainsborough responded by throwing on Darryn Stamp and he was close to levelling within 5 minutes of coming on.
After a Jarman free kick was blocked, Adam Quinn clipped in a cross to the far post onto the head of Stamp and Ormson again thwarted the Trinity frontline.
Another substitute Stephen Brogan was the next to try his luck from a tight angle and his rifled left footer flashed by the far post and County escaped with a clean sheet and the three points.
After the match, manager Steve Housham believed his side to be unlucky not to get at least a point.
He said: “It was a very close game, a good game to watch. It’s not nice losing a game of football but it was between two evenly matched teams. We just got done by the one goal and we missed numerous chances as well. I said to the players, if you look at the Tamworth and Nuneaton games, we have come on a lot since those two games.”
“When you are against those better teams, you have to put your chances away and if you look at the games against the big sides we’ve not managed to score. That is the difference. It’s not as if we have not had the chances today, we just didn’t put them away.”
Gainsborough Trinity: Budtz, Roma (Wilson 89), Lacey, D’Laryea, Quinn, Picton, Russell, Davis (Brogan 70), Newsham (Stamp 74), Jarman, Yates. Subs: Binns, Forrest. Stockport County: Ormson, Morton, Roberts, Connolly, O’Hanlon, Joyce, Baggie, Montrose, Odejayi, Evans (Hazeldine 87), Garvin. Subs: Thorniley, Ellison, Robinson, Hurst.
County Goalscorer: Evans 62.
Bookings: Russell; Montrose, Evans.
Referee: Mr A Greenwood. Assistants: Mr S Porter, Mr G Rhodes.