Goals from Luke Waterfall, Greg Young and Simon Russell secured the points for the Blues, and inflicted a seventh straight defeat on their hosts at St George’s Lane.
The game was the last ever floodlit match at the ground, before it is bulldozed in June.
And it was hardly a fitting spectacle, as a poor quality encounter was watched by the lowest attendance of the season at the Lane, just 536.
Trinity enjoyed the better of the first-half and almost took the lead in the 18th minute when a snap shot from Russell was deflected wide by the boot of Lee Ayres.
But only four more minutes had elapsed when the visitors did break the deadlock.
Charlie Reece was judged to have handled 25 yards from goal and from the free-kick, Russell picked out Waterfall at the far post and he headed past Matt Sargeant.
It took until the 41st minute for City to register their first effort of note, new signing Ethan Moore forcing a good save from Jason White from the edge of the box.
But a dismal opening period deteriorated further for the hosts as they conceded again from a set-piece in injury time.
Craig Nelthorpe delivered a corner from the right and Young was in first to power a header home off the underside of the bar.
Trinity were denied a third six minutes into the second period, Danny Glover heading Young’s effort off the line.
But City began to dig in and Moore’s header from Stuart Whitehead’s right-wing cross was superbly tipped past the post by White moments later.
White also smothered from the Worcester striker after Waterfall had under-hit an intended back-pass.
Any chance Worcester had a salvaging anything was extinguished 11 minutes from time when Ayres was judged to have handled in the area and Russell despatched the penalty.
The hosts created a flurry of late chances with White saving from Moore before watching as the striker curled an effort inches wide.
The Trinity keeper also got down low at his near post to deny Glover in the closing stages.
Worcester City: Sargeant, Whitehead (Breeze 72), Edwards,Thorley, Ayres, Shabir, Reece, Elvins, Glover, Moore, Mills (Taylor 80). Subs not used: Symons, Morris, Thompson.
Gainsborough Trinity: White, Roma, Young (Wilde 75), Waterfall, Hone, T Thompson, Russell, Nelthorpe, Barraclough (Platt 83), Stamp, Yates. Subs not used: Hawkridge, Clarke, Jones.
Referee: M D’Aguilar.