Derry moved up to second place in the Premiership Division thanks to a second-half strike from Barry McNamee.
It was a first half of few chances at Richmond Park with City striker Rory Patterson firing over while Conan Byrne went close for St Pat's.
McNamee met Patterson's flick to volley low into the net on 63 minutes.
Patterson burst clear but saw his shot saved by Brendan Clarke while St Pat's substitute Dylan McGlade dragged wide as the Derry defence held firm.
Derry, buoyed by Monday's EA Sport Cup quarter-final win over Cork, made a bright start in Dublin with Patterson's deflected effort flying just over.
Jamie McGrath impressed as the St Pat's came into the game and they threatened before the break with Byrne rifling wide before Gerard Doherty denied David Cawley.
McNamee missed the target seconds before finishing with skill and composure for the only goal.
Patterson should have doubled the lead but the former Plymouth and Linfield forward lost out in his one-on-one duel with Clarke.
It was a frustrating night for St Pat's, who had two second-half penalty appeals turned, while City returned to winning ways in the league after last week's defeat by Sligo.
Leaders Dundalk beat Galway United 2-1 to remain five points clear of the Brandywell men.