Hampshire 208 (Barker 84, Vince 62) and 66 for 3 (Holland 22, Northeast 18*) beat Middlesex 172 (Gubbins 51, Abbott 6-44) and 101 (Abbott 5-41) by seven wickets
Abbott followed his 6 for 44 in Middlesex's first innings with 5 for 41 to restrict the hosts to 101 in their second, setting Hampshire a target of 66.
In keeping with the theme of the match where batting was tough going, the run-chase was far from straight-forward amid wickets, rain and fading light, with the forecast for heavy showers throughout much of Sunday's final day meaning time was of the essence.
Earlier, Barker defied the narrative, playing with freedom and smashing four sixes and nine fours on his way to 84, which gave Hampshire a narrow first-innings lead after they had resumed on 131 for 7, still trailing Middlesex's paltry 172.
A first-innings lead of any sort looked unlikely for Hampshire when they slumped to 9 for 3 and Barker's 54-run partnership with James Vince on Friday was crucial in giving them a fighting chance.
In the end, he only managed to get the advantage up to 29 runs as his remaining batting partners all fell cheaply but managed to hang around long enough for him to raise his score significantly from 23 not out overnight.
Shortly after Abbott was bowled by teenager Blake Cullen for 6, Barker pulled Ethan Bamber sweetly for four through midwicket. Barker helped himself to 11 in the next over, including a straight drive for four to bring up Hampshire's 150 and a six over deep midwicket off a Cullen short ball.
Barker struck back-to-back fours off Tim Murtagh, both powerful strikes over the head of deep mid-on, the first bringing up his 50 and taking Hampshire into the lead.
Murtagh responded with the wicket of Brad Wheal, edging behind to John Simpson, but he came in for more Barker punishment in his next over, 18 runs worth, as he was pummelled for sixes over deep square leg and deep midwicket and crashed straight down the ground for four.
Barker hit his fourth six off James Harris way over Peter Handscomb's head at long on. It was the same bowling and fielding combination, however, that brought about his downfall, Barker swinging his bat one too many times, on this occasion at a short ball from Harris and picking out Handscomb at mid-on to end the innings.
Vince's tenacious 62 the previous day was Hampshire's only other score of note as they found the going almost as difficult as their opponents had.
With pace duo Abbott and Mohammad Abbas back in action - they took nine wickets between them in Middlesex's first innings - it was far too soon from the hosts' perspective that they were three wickets down and still 10 runs in arrears.
The pair accounted for the first five Middlesex batters in their second innings, including a magnificent return catch to Abbas diving forward in his follow-through to dismiss Robbie White, before Abbott's lbw dismissal of Handscomb, whose 24 was his highest score in seven innings so far for this Championship campaign.
By that stage, Middlesex were in awful trouble at 49 for 5 and that was before Barker chimed in with the wicket of Martin Andersson, lbw for 9. Wheal's pin-point delivery then bowled Simpson, also for 9, and at 67 for 7 with the sky as bright as it had been all match, they were once again braced for the inevitable.
At 93 for 7 the rain did arrive, bizarrely a heavy sun-shower after the players had shivered through two days of bitter cold and gloom. Tea was taken a few minutes early as a result and when play resumed, it looked as though spring had finally - finally - arrived, the sky above Lord's actually, positively, yes, most definitely, sunny.
So too was Hampshire's outlook when, on the eighth ball after the break, Abbott had Harris out lbw to claim his 10th wicket for the match. Abbas then trapped Cullen lbw and Abbott wrapped up the innings with the scalp of Bamber, also lbw.
Ian Holland and Joe Weatherley set about the run-chase with care, Holland's cracking drive for four through extra cover off Cullen bringing a roar from the Hampshire balcony as a bank of dark cloud hung over the Pavilion.
The visitors were 23 for 0 when another downpour arrived but, with a result in sight and the sun reappearing once more, play resumed at 6.45pm with eight overs remaining.
Bamber struck with the third ball back when he had Weatherley out lbw and there was nearly a run-out chance when Holland and Liam Dawson got involved a mix-up moments later while Bamber was appealing unsuccessfully for lbw against Holland.
Dawson, promoted to No. 3, then fell lbw to Murtagh, who claimed another when he had Holland out plumb with 26 runs still needed.
The Middlesex fielders were keen to remind the batters of the next day's forecast in the fading light, but Hampshire had the final say, Sam Northeast's consecutive fours off Murtagh leaving them in need of 16 off the final two overs of the day and Tom Alsop made it eight required off the last with two fours off Bamber.
There was more drama when Northeast got a leading edge on a Murtagh delivery, which sailed straight to mid-on where Cullen spilled the chance and Northeast made the most of his reprieve with fours off the next two balls to finally seal victory.