The middle-order batsman struck 77 not out from 105 balls on a difficult St James’s Hosptial wicket.
Vice-captain James Heiniger lauded the performance of Cornish as Fareham leapfrogged the hosts in the table.
He said: ‘It was a great knock.The wicket wasn't unplayable but it was a bit tricky and the sort where you had to take your time at the start.
‘Luke did that brilliantly before exploding towards the end.
'Is proving one hell of a signing.... A real livewire' - Portsmouth match ratings from 2-0 win at Cheltenham
Portsmouth transfer news: Blues receive bids for former Luton and Millwall midfielder
Transfer gossip: Portsmouth eye raids for ex-Chelsea man and Charlton Athletic's former Wigan Athletic midfielder
Portsmouth boss Danny Cowley hails squad depth as tactical masterclass at Cheltenham pays off
Cheltenham 0-2 Portsmouth: Colby Bishop steals show as Blues prove too hot to handle in impressive display at sun-soaked Whaddon Road
‘He is in great form at the moment and holding together our middle-to-lower order batting.'
After being put into bat, the visitors lost Dan Wimble and Heiniger with only 18 runs on the board.
Steve Berryman (44) started the recovery along with Sam Stoddart (19).
Cornish batted through to the end helping Fareham finish on 215 for eight.
With Matt Benfield (78) going well the home side looked in a good position at 98 for three.
Cornish was determined not to see his earlier effort wasted, however, and he had the danger man caught off his bowling.
Ben White (four for 31) made sure of the win by removing the final four home batsmen
‘It was a great death bowling spell from Ben,' said Heiniger.
‘He is excellent at cleaning up the tail.
‘Morgan Frost and James Headen also bowled tight spells. All in all it was a great team performance.
‘That is two wins from our past three games and it is nice to move out of the danger zone.
‘We are under no illusions, though, and know there is still a lot of hard work to be done.
‘Two or three more wins will give us a little bit more breathing space.’
Hambledon slipped to a third successive defeat losing by 105 runs against leaders Bashley (Rydal) II.
Purbrook returned to winning ways with a narrow two-wicket win at Trojans.
Brad Mengham (four for 39) grabbed a four wicket haul and Martin Lee (37) and Clark Harding (32) ensured the visitors chased down their 168 run target.
Meanwhile, Waterlooville's winning run came to an end with a 23-run defeat at division two leaders Totton & Eling.
In division one, Portsmouth cruised to a 10-wicket win at New Milton.
Fraser Hay (six for 36) and Reuben McArdle (three for 40) skittled the New Forest side out for just 76 runs.
Ricky Rawlins scored an unbeaten century in Sarisbury Athletic's five-wicket win at Sparsholt.
In the premier division, Burridge and Havant both lost to Bashley (Rydal) and Lymington respectively.