Stockport's record-breaking run of nine wins and nine clean sheets was brought to a shuddering halt at Underhill as Barnet produced a superb display.
The visitors' early domination was rewarded when Michael Rose's corner was turned in on the post by Tes Bramble.
However, Oliver Allen curled in a fine equaliser - the first time keeper Wayne Hennessey had conceded in 862 minutes.
And Stockport never recovered despite Rose hitting a bar, Dean Sinclair rifling in before Liam Hatch sealed it.
Barnet: Flitney, Devera, Yakubu, King, Gross, Cogan (Lewis 88), Sinclair, Hessenthaler, Puncheon, Birchall (Hatch 76), Allen.
Subs Not Used: Harrison, Graham, Hendon.
Booked: King, Flitney, Gross.
Goals: Allen 44, Sinclair 47, Hatch 82.
Stockport: Hennessey, Clare, Williams, Owen, Rose, Poole (Dinning 84), Taylor, Blizzard, Griffin (Pilkington 70), Elding, Bramble (Dickinson 49).
Subs Not Used: Spencer, Raynes.
Booked: Owen, Pilkington.
Goals: Bramble 33.
Att: 2,647
Ref: M Thorpe (Suffolk).