Pompey beat non-league Havant & Waterlooville to maintain their winning start to pre-season.
But following a midweek rout of Irish outfit UCD, they found the going tougher against their hosts from the National League South.
Gareth Evans opened the scoring from the penalty spot following a foul on Ellis Harrison, but Roarie Deacon fired the Hawks level after the break.
Brett Pitman was among a number of players introduced during the second half and he was teed-up by Brandon Haunstrup to score the winner late on.