The victory halted the Privett Park outfit'sÂ slide down the table and ended a run of five games without a success.
Borough had to battle from behindÂ to pick up all three points, however.Â
McAllister, Pat Suraci and Tony Lee were on target for the hosts.
And the player-manager toasted his side's display against the fourth-placed visitors.
McAllister said: '˜It is the best we have played all season.
'˜We got there in the end with all the players stepping up to the plate.
'˜The players have been working hard and things came together in this game.
'˜We got into the opposition's face and made it difficult for them.
'˜Even when we went behind we showed the character not to drop our heads but keep at it.'
The game started brightly, with Borough creating some early opportunities.
The visitors who broke the deadlock on 38 minutes, though, with a good goal scored slightly against the run of play.
Borough hit back to level within two minutes, however.
Ryan Case sent McAllister between two defenders and the experienced striker bent his shot into the top corner of the net.
Gosport dominated the gameÂ in the second half.
On 61 minutes the visiting keeper could only parryÂ an effort from Harry Medway, which left Lee with a simple tap-in.
Borough sealed their win at the death throughÂ a well-worked goal.
Jake Thomson, Ryan Pennery and Lee were all involved, before Suraci finished the moveÂ off at the back post.
The performance displayed what Gosport are capable of and McAllister now wants his troops to climb back up the division.
The boss added: '˜The bar has been set and now we have to stay there.
'˜We probably created more chances in this game than we have in the past four or five.
'˜Now we need to get ourselves on a winning run to push higher up the league.
'˜If we can be around the top 10Â or 12Â come Christmas then it will be job done.
'˜That has to be our target.'
Borough's trip to Weymouth on Tuesday has been postponed for a second time as the home side are involved in an FA Trophy replay.