The move up the table was helped by a late injury time penalty for Dundalk who beat Bohs 1-0 at Orial Park.
Candy Stripes manager Declan Devine can be well pleased with his team’s performance and recent form with four wins now on the bounce in the league.
It now sets up a tantalising game this Friday night at the Ryan McBride Brandywell Stadium when City host league leaders Shamrock Rovers.
A win this Friday would help cut the deficit between Rovers and City to five points but Derry will still have a game in hand.
Patrick McClean set Derry on their way to a fourth straight league win with a second-minute goal and then Gerardo Bruna made it 2-0 with a free-kick.
Kevin Toner was sent-off and Junior Ogedi-Uzowke made it 3-0 before Gary Shaw pulled one back before half-time.
Derry were aiming for a fifth consecutive victory in all competitions and got off to the perfect start at Richmond Park when defender McClean drilled in a speculative shot from 25 yards which bounced in front of Brendan Clarke and into the net.
Bruna scored his second goal for Declan Devine’s side with a beautifully struck 18th-minute free-kick into the bottom corner and a minute later Toner was dismissed for a rash challenge on visiting captain Ciaron Harkin.
On the half hour Junior steered the ball into the net with his body at the back post to extend Derry’s lead.
Centre-back Shaw threw St Pat’s a lifeline when he found the net with a diving header soon after but the remainder of the game failed to yield many clear-cut chances.
Derry’s busy period of fixtures continues.
After Friday’s crunch match against Rovers, the Candy Stripes go on their travels with an away match against Waterford on Easter Monday.
St Patrick’s Athletic: Brendan Clarke; Lee Desmond, Kevin Toner, Ciaran Kelly; Simon Madden, Rhys McCabe (Cian Coleman half-time), Jamie Lennon (Dean Clarke 76), Conor Clifford, Ian Bermingham; Darragh Markey (Jake Walker 80); Gary Shaw.
Derry City: Peter Cherrie; Darren Cole, Josh Kerr (Eoin Toal 88), Ally Gilchrist, Patrick McClean; Ciarn Harkin, Gerardo Bruna (Barry McNamee 71); Eoghan Stokes (Ciaran Coll 66), Greg Sloggett, Junior Ogedi-Uzokwe; David Parkhouse.
Referee: Paul McLaughlin (Donegal).