A brace from leading marksman Danny Rowe secured a well-deserved victory which preserved Fylde’s 11-point lead at the top of Vanarama National North.
Rowe struck his 40th league goal of the season to give the Coasters a half-time lead, though Trinity hit back shortly after the break with a controversial penalty from Jordan Thewlis.
It was to be Rowe who had the last laugh, though, when some superb individual skill saw him fire home with the aid of a deflection off midfielder Ioan Evans.
Fylde manager Dave Challinor shuffled his pack, with Macauley Wilson and Matty Hughes replacing Caspar Hughes and Brendon Daniels, while Sam Finley made his first start since November in place of Bohan Dixon.
The Coasters looked to utilise Dan Jones’ huge throws right from the off and Dom Collins headed narrowly over from one of Jones’ speciality catapults.
Finley was a whisker away from breaking the deadlock when another Jones throw was knocked down by Rowe but the midfielder’s snatched effort from 10 yards was inches over the bar.
Rowe almost found the opener himself moments later, when he launched a freekick from fully 35 yards that whistled agonisingly wide.
Top scorer Rowe was looking lively and did well down the right before picking out Dan Bradley, who saw his near-post strike blocked.
Rowe was getting closer and fizzed another powerful free-kick straight down the throat of Trinity keeper Tom Nicholson.
The hosts tested Fylde with a couple of dangerous set-pieces but nothing of real note in a relatively uneventful first half-hour.
The match suddenly came to life in the 41st minute as the Coasters took the lead. Under pressure from Finley, stopper Nicholson failed to deal with a back pass and cleared straight to Rowe, who looped the ball over the stranded goalkeeper from 25 yards.
Gainsborough fashioned their first real opening two minutes after the break, when striker Ashley Worsfold turned his man on the edge of the area and fired a low stinging strike that was well turned around the post by Rhys Taylor.
Collins had a glorious chance to double Fylde’s advantage a moment later, when a pass from Jones was deflected into his path on the 18-yard line but the defender scuffed his effort the wrong side of the upright.
Rowe picked up where he left off after the break and raced through from halfway before cutting inside and rifling a vicious strike over the bar.
Nine minutes after the break the visitors were back on level terms. Thewlis broke into the box and, despite going down rather theatrically, was awarded a penalty that he converted into the bottom right corner.
Frontman Rowe continued his pursuit of more goals with another fierce free-kick that was tipped over the bar.
Laurence Maguire went closer still from the resulting corner, watching on in despair as his strike at the back post was cleared off the line.
Third-bottom Gainsborough provided more of an attacking threat in the second half and Taylor had to been on his toes to keep out Callum Chippendale’s deflected strike from 20 yards.
However, Rowe scored the winner with 15 minutes to play, turning his man inside out onthe left of the area before letting rip with a left-footed strike that was deflected past Nicholson by Ioan Evans. In-form Rowe’s second of the game took his tally for the season to 44 in all competitions.
Gainsborough huffed and puffed in the final 10 minutes but the Fylde backline stood firm, stretching their unbeaten run to five games ahead of Saturday’s home clash with third-placed Kidderminster.
Fylde boss Challinor was pleased to see his side grind out a win at Gainsborough.
He said: “It wasn’t a vintage performance but it’s been a tough week mentally, so to grind out a result is fantastic for us.
“Do we want to play like we did today? No, we want to play good football but sometimes you have to win matches no matter how you play. At this stage of the season, performances aren’t critical but results are.”
That will certainly be the case in Fylde’s next two games, at home to top-six rivals Kidderminster and Stockport. The Harriers visit Mill Farm on Saturday and Challinor added: “The game would be even more important if we were level on points but we’re in a great position.
“If they have aspirations of catching us they have to come and win, but no question it’s a big game for us too because it would give us three points and prevent our rivals from getting points too.”
As to the possibility of James Hardy returning, the Fylde boss added: “I’m not sure. He’s done some work this week on the treadmill and he’ll be on the grass on Monday.
“Dan Jones’ loan now ends and Laurence Maguire’s ends after the Stockport game.
“Hopefully we can extend them until the end of the season but it depends on their parent clubs. We just need to make sure we have enough bodies to cover us.”
DANIEL AGNEW AND JACK CONNOR
AFC Fylde: Taylor, Wilson (C. Hughes 45), Collins, Maguire, Jones, Bond, Finley, Morgan (Baker 82), Bradley, M. Hughes (Daniels 71), Rowe; s ubs not used: Dixon, Blinkhorn.
Gainsborough: Nicholson, Jacklin, Beatson, Nyoni (Wiles 73), Wilson, Evans, Chippendale (Jarman 84), Tempest, Worsfold, Thewlis, Davie (Bailey-King 81); subs not used: Salt, Willis.
Ref: Darren Middleton