A stunning late strike from substitute Mark Rossiter earned Bohemians a deserved victory as Pat Fenlon's side closed the gap on leader St Patrick's Athletic to two points.
Rossiter, on the pitch just minutes, drilled home an unstoppable 22-yard drive from fellow substitute Jason Byrne's lay-off in the 87th minute.
Trailing to Neale Fenn's 35th minute opener, Alan Mathews' side thought they had salvaged a point on 81 minutes when George O'Callaghan's free-kick flew into the Bohs net off their skipper Owen Heary's head.
But a third defeat in four games, and against their main rivals at that, now sees Cork languishing 10 points off the pace back in seventh place.
Though Bohs enjoyed much of the early possession it was Cork who carved out the first couple of openings, both inside a minute.
Danny Murphy, returned to the side following suspension, put striker John O'Flynn in behind the Bohs rearguard. But with keeper Brian Murphy committed, O'Flynn totally miscued his attempted lob which was gratefully grasped by the keeper.
That was on 12 minutes and Bohs were caught square at the back again within a further 60 seconds. Joe Gamble threaded the ball through for the run of Dave Mooney. Murphy was again promptly off his line to save at the striker's feet.
Bohs continued to enjoy more of the ball and their first flowing move - begun but not finished by Glen Crowe - should have brought the lead on 27 minutes.
Fenn spread the ball wide right to John Paul Kelly with the early cross picking out the unmarked Crowe at the back post. But the shot from the ex-Ireland international was straight at keeper Mick Devine while Crowe's tame follow-up was cleared off the line by City skipper Dan Murray.
It was a mere reprieve as Bohs deservedly went in front eight minutes later.
A disputed foul by Murray on Fenn brought the goal. Killian Brennan, anonymous till then, swept over a terrific free-kick to the back post where Fenn rose well to score with a downward header.
Bohemians: Murphy; Heary, Oman, Burns, Powell; Kelly (Rossiter, 84 mins.), Cronin, O'Donnell, Brennan; Fenn (Byrne, 87 mins.), Crowe (McGuinness, 90 mins.).
Cork City: Devine; Horgan, Sullivan, Murray, Danny Murphy; Kearney, O'Callaghan, Gamble, Ryan (Darren Murphy, 60 mins.); Mooney, O'Flynn (Behan, 70 mins.).
Referee: Richie Winter (Dublin).