After the hosts took the lead through a 32nd-minute penalty from John Akinde, who it was judged had been fouled by Jack Taylor, Clarke-Harris equalised around 90 seconds into the second half.
Siriki Dembele put Posh in front five minutes later, and Clarke-Harris added his second in the 67th minute as Darren Ferguson’s men – now a point behind leaders Lincoln – registered their third successive victory.
Fourth-placed Portsmouth were beaten 3-1 at Bristol Rovers, having been a goal up.
John Marquis put Pompey ahead in the 26th minute before the Pirates replied through Jonah Ayunga goals in the 34th and 44th, and Luke Leahy’s penalty with 20 minutes to go.
Marquis saw a late spot-kick saved by Joe Day in what was Portsmouth’s final game before starting a period with boss Kenny Jackett not attending matches and training sessions while he recovers from a medical procedure.
The result sees Rovers, who ended an eight-game winless run in their first match since sacking Paul Tisdale, move up two spots to 18th and they are now two points clear of the relegation zone.
Northampton are also up two places to 21st, level on points with 20th-placed AFC Wimbledon, after their first fixture since sacking Keith Curle saw them draw 0-0 at Ipswich, who had Flynn Downes sent off late on.
Blackpool beat Rochdale 1-0 at home, with Sullay Kaikai scoring a 21st-minute winner.
Darren Ferguson says old-fashioned half-time hairdryer treatment helped Peterborough battle back to beat Gillingham 3-1.
Posh created chances in the first half but found themselves behind at the break to John Akinde’s controversial penalty.
Ferguson revealed he ripped into his side at the interval and got the response he was after as Jonson Clarke-Harris bagged a brace to inspire a comeback.
“In the first half, we just didn’t get going, we couldn’t keep the ball well enough,” said Ferguson.
“It is a difficult place to come and with the wind as well it made things more difficult, but aside from the goal they haven’t troubled us at all. Christy hasn’t had a save to make in the entire game.
“We got into the players at half-time and said to them they didn’t do themselves justice in the first half.
“We changed the formation, and it is a formation we have worked on quite a bit in recent weeks and we caused them plenty of problems.
“It was an excellent performance in the second half. We made a great start, scoring as early as we did and from then on we dominated and could have had more goals if I am honest.
“We passed the ball a lot quicker and scored some really good goals.
“Credit to my players for the way they responded in the second half, it was a terrific effort from all of them.”
It was Peterborough’s seventh league victory in 11 games and saw them climb back into the automatic promotion places.
Gills striker Akinde opened the scoring from the penalty spot on 32 minutes after referee Charles Breakspear controversially ruled that he had been pushed by Jack Taylor.
The Posh comeback started just 90 seconds into the second half as top scorer Clarke-Harris pounced on a weak Jack Bonham parry and Dembele’s deflected effort made it 2-1.
Clarke-Harris struck again on the hour mark and Gills boss Steve Evans felt the scoreline flattered his former side.
“We were by far the better side in the first half. I think we dominated them, we were bright and bubbly,” he said.
“We’ll get no credit for that and I was concerned coming in at half-time. You know Peterborough will react – we didn’t need to help them.
“I think had we come through the first 10 minutes of the second half we might be talking about something different. We spoke about keeping it tight so I’m disappointed with the individual errors.
“We were mistake littered for the first 15 minutes of the second half. Their first goal should be a simple save; 99 times out of 100 Jack Bonham saves that. It’s a big error and if you do that against big teams you get punished.”