The all-rounder bowled Josh McCoy, before having Graham Burns and Andrew Galliers caught off the next two balls to reduce the visitors to 57-6. He went on to take 4-37 as Havant were dismissed for 128.
Hartley's reply got off to a bad start, with openers Matt Kerr and Jack Hersh both falling early on, but Danny Plume (58 not out) and Karvelas (35) turned the tables with a third-wicket stand of 62.
After Karvelas was dismissed, Plume went on to reach his half-century, seeing the hosts over the line with the support of Paul Westfoot (6) in an unbeaten partnership of 65.
The result leaves Hartley mid-table, having won two and lost three of their opening five games.
Basingstoke and North Hants II beat hosts Tichborne Park by 50 runs in Division Three.
Batting first, the visitors made 225, Steve Bucksey top-scoring with 66. Tichborne were bowled out for 175 in reply, with Keith Harris and Jarred Opperman, a recent signing from Hook, taking three wickets each.
Basingstoke sit third in the table, having won four of their first six games.