High-flying Cowdeanbeath had scored 18 goals in four games this season but the bubble burst in dramatic fashion as Brechin came from behind to score three times in the second half with veteran striker Paddy Connolly grabbing a double.
City started as they meant to go on, winning most of the 50-50 tackles, although Cowdenbeath were dangerous on the break and defender David White had to make a crucial block to deny Liam Buchanan.
The tried and tested partnership of Pat Scullion and Markus Paatelainen was also causing Brechin problems but home keeper David Orr then began to lose the plot, flapping nervously at a simple cross and making a mess of a routine shot from John Ward.
More excellent defending by White kept out another trademark free kick from Scullion and moments later full back Laurie Ellis saw his header cleared off the line by Craig McEwan.
Scott Dalziel struck the Brechin post with a stinging volley and skipper Innes Ritchie missed a free header for Cowdenbeath, but the home side finally went ahead two minutes before half-time when Buchanan found the net with a delicate chip after Pat Clarke's effort had been blocked.
City equalised early in the second period with an even better angled finish by Connolly and when White's header came back off the underside of the bar Grant Johnson nodded home the rebound to make it 2-1.
Paatelainen hit the post and Ellis wasted a glaring chance for Cowdenbeath before City scored the killer third goal as Connolly met Ross Archibald's cross with a bullet header.