Jack Diamond’s 95th-minute winner earned a 2-1 triumph for the League Two side and their 121 away followers.
The Blues’ Ellis Harrison had earlier registered a first-half stoppage time leveller to cancel out Luke Armstrong’s opener.
Yet, in a disappointing second half, it was Harrogate who emerged as the stronger team against a Pompey side missing George Hirst and Joe Morrell through illness.
Portsmouth loan strategy revealed following duo's arrival from Ipswich and Blackpool respectively
'Is proving one hell of a signing.... A real livewire' - Portsmouth match ratings from 2-0 win at Cheltenham
RECAP as Colby Bishop steal show as Portsmouth edge Cheltenham at sun-soaked Whaddon Road
‘For the sake of 90 minutes football, it’s not worth a player being off work for a year or ending up in a wheelchair’ – Hampshire grassroots football clubs postpone matches due to the heatwave
Predicted Portsmouth XI v Cheltenham: changes expected to side that beat Cardiff so handsomely - but attacking duo could keep places and defender set to return
And afterwards, Cowley revealed the full extent of the non-Covid bug which impacted his squad selection ahead of the Fratton Park encounter.
He told The News: ‘I’m bitterly disappointed, I thought we got what we deserved today.
‘Credit to Harrogate, they were humble, really hard working, played with an energy and intensity.
‘We had a lot of good chances in the first half and didn’t take them. They scored and we did well to respond, but we were short.
‘We’ve had a difficult week, with a lot of illness among the group.
‘Joe Morell didn’t make it, George Hirst pulled out this morning, we’ve had seven or eight others who have been affected by it and it has disrupted training.
‘I don’t like to give excuses to players after poor performances, but maybe that affected us.
‘It’s a sickness bug, non-Covid related, which has gone through the group. A lot were suffering, temperatures, sickness, headaches, a lack of energy – that has been the issue all week.’
Miguel Azeez was handed a start alongside Shaun Williams, while Harrison featured up front as Cowley plugged the gaps of Hirst and Morrell.
Yet the team performance was nowhere near good enough against a side positioned seventh in League Two.
Cowley added: ‘We had only two senior midfielders available in the squad, it has been one thing after another this season, it has been really tough.
‘We have lots of forwards available, but were really lacking in the midfield area, as it showed.
‘I’m just telling you the reasons, Harrogate deserved to win – and we have to accept that.’
A message from the Editor, Mark Waldron
You can support our local team of expert Pompey writers by subscribing here for all the latest news from Fratton Park for 14p a day.