Boro had to be patient before Ryan Woodford's header from Mason Walsh's corner finally broke the deadlock on 75 minutes.
Luke Hallett's clever hooked effort eventually found the net, despite Louis Kellaway's best efforts to clear off the line, as Gosport added a second goal in the space of three minutes to battle to a hard-fought victory.
Yet Wimborne, with just one league win all season, had created the better openings and frustrated Boro for long periods prior to Woodford's opener.
But Gosport will not be overly bothered how this victory - a first in four matches on the back of two defeats and a draw - arrived as they remain in fourth in the table.
Bert White pulled off a fine stop to keep out Louis Keelaway's stunning volley which looked destined for the top corner after nine minutes.
The Boro goalkeeper then spilled the ball into the path of Jez Bedford who saw his goalbound effort cleared by Josh Huggins to get White out of trouble six minutes later.
White was called into action again on 21 minutes, this time tipping over Curtis Young's long distance effort.
Gosport were struggling to assert themselves against the division's bottom-side, although Matt Paterson wasted a superb chance firing over from close range after Luke Hallett pulled back for him after 28 minutes.
Bradley Tarbuck and Mike Carter were thrown on at the start of the second half but it was still Wimborne who were looking the more likely.
Centre-half Matt Casey was caught in possession on the edge of the area, with Weymouth loanee Ahkeem Rose firing just wide from the edge of the area on 61 minutes.
Boro winger then latched onto the ball, cut inside, but saw his fierce drive gathered by Alexander Cull a minute later.
Gosport gained some momentum and would have taken the lead on 70 minutes had Kellaway not hacked Hallett's header clear on the line.
But Boro did finally get the opener five minutes later with Woodford's header going in off the underside of the crossbar after he met Mason Walsh's corner.
A crucial second arrived for Gosport three minutes later when Hallett's hooked effort was adjudged to have crossed the line despite Kellaway's best efforts to clear.
Gosport Borough: White; Kavanagh, Woodford, Casey, Huggins, Wheeler, Hallett, Busari, Wooden, Walsh, Paterson. Subs: Tarbuck (Busari, 45), Carter (Paterson, 45), Lethbridge (Tarbuck, 81), Rew, Lewis.