Franck Moussa's late goal lifted Coventry City out of the drop zone at the expense of winless Gillingham.
The home side led after just 55 seconds, Leon Clarke converting Cyrus Christie's cross before ex-City striker Cody McDonald levelled from 12 yards.
Clarke squandered numerous chances for the hosts and hit the woodwork twice.
Callum Wilson then struck a post but Moussa bundled in Clarke's goal-bound header for his fourth of the season from Blair Adams' corner.
The result means Steven Pressley's side are on four points, despite starting the season with minus 10, and are still unbeaten at their temporary Sixfields home.
following a dispute with the owners of the Ricoh Arena and have now scored 13 goals in four games at the stadium.
Gillingham remain in the bottom four and are still searching for a first victory since earning promotion last term.