Callum Paterson scored in the first half to put rock-bottom Hearts in front, and the hosts left it until the 89th minute to draw level through De Leeuw. And two minutes into added time De Leeuw set up Brittain to give County all three points.
County had started the game well – Ivan Sproule was almost through on goal early on until Kevin McHattie’s perfectly-timed tackle.
Brittain was well wide with an early sighter, before Graham Carey found the head of Scott Boyd but the defender’s effort flew well over.
Steven Ross turned sharply and fired just wide, and County had a penalty appeal waved away on 19 when Brad McKay and Ross tangled in the box.
It was against the run of play then when Hearts took the lead on 23. McHattie whipped a ball into the box and Paterson tucked the ball past Mark Brown from six yards.
County were almost caught out again in the 32nd minute when Paterson raced on to a long ball over the top but this time he shot wide.
But County continued to batter at the door until half-time, and again after the break, Ross shooting wastefully high and wide on 55.
Hearts were occasionally able to break out, and on the hour mark they should have gone 2-0 up.
Jason Holt got to the byline but his cut-back was slightly behind Paterson who could only deflect the ball wide of Brown’s left-hand post.
De Leeuw and Gary Glen came off the bench and it was the former who turned the game on its head.
With a minute left, Brittain swung over a deep cross from the right touchline and sub De Leeuw headed in at the back post.
And it got even better for County in the second minute of stoppage time when the roles were reversed.
De Leeuw fired over a cross from the left and Brittain headed powerfully into the net for an unlikely winner, though on the balance of play the hosts deserved the points.