Northants closed their second innings at 44 without loss, and go ino the third day of four leading by 109.
Payne removed four wickets in 11 balls in the morning session to whittle the County out for 326, before his half-century helped boost Gloucestershire to 261, reducing the first-innings deficit to 65.
But it was Northants who ended day two on top as Ben Duckett gave their second innings a bright start following Rob Keogh’s four for 67.
Keogh helped reduce Gloucestershire to 158 for seven before Payne followed up his career-best 67 not out at Cardiff last week with another half-century here - just his fourth in first-class cricket - to provide the visitors with a second batting point.
He survived a diving chance offered to Rory Kleinveldt at third slip on 10, but thereafter played with composure.
A loose drive sped away to the third man rope for his ninth four and a single took him to fifty in 57 balls.
Together with Jack Taylor, they began a smart recovery shortly before tea. Keogh had Will Tavare caught at short midwicket after a dogged innings trying to regain form, before Phil Mustard tried to drive outside off stump and got a thin edge to wicket-keeper David Murphy.
Before Keogh’s wickets, Mohammed Azharullah made the breakthrough after lunch with a delivery that nipped away from Hamish Marshall to clip the outside of the off stump and Steven Crook fired a full straight delivery into Craig Miles’ stumps to leave the visitors in trouble.
They had hoped to be in a better position after Payne ran through through Northants’ lower order, taking the four remaining wickets without conceding a run.
Crook fell second ball of the day trying to late cut and getting a thin edge to Mustard, four balls later Kleinveldt drove loosely to extra-cover.
Murphy scored Northants’ only runs of the day with an edge to third man before Payne returned to have Azharullah smartly held at third slip by Marshall.
Ben Sanderson lost his off stump next ball as Payne, wicketless on the first day, finish with four for 57.
In reply, Gloucestershire lost Chris Dent to a thin edge behind and Gareth Roderick to a better catch from Murphy for Kleinvedt’s second wicket.
When George Hankins slapped a pull to square leg and was very well held by a diving Adam Rossington, the game was back on an even keel but the hosts had taken control by stumps.