When Tommy Miller struck in the 88th minute to give Hartlepool a 2-1 lead, Alan Cork's men looked doomed to their first defeat in seven games.
But up popped Mark Bonner to equalise one minute later and then Nogan completed the great escape.
Keith Stephenson had given the visitors the lead after 15 minutes when poor City defending left him all alone in the six yard box.
The Bluebirds quickly replied with a Leo Fortune-West header two minutes later, but for the majority of the match honours were even and a draw looked the more likely result.
But Alan Cork's battling nature had rubbed off on his side and City claimed all three points.
Cardiff: Walton, Low, Gabbidon, Young, Jordan, Weston, Bonner, Evans, Bowen, Earnshaw, Fortune-West. Subs: Greene, Collins, Nogan, Brayson, McCulloch.
Hartlepool: Williams, Arnison, Westwood, Strodder, Barron, Clark, Tinkler, Stephenson, Miller, Henderson, Midgley. Subs: Sharp, Hollund, Shilton, Boyd, Fitzpatrick.
Referee: P Rejer (Tipton)