Stockport secured a welcome victory at Edgeley Park, but Wrexham's worries continue as this was their fifth straight defeat.
Stockport had the first chance inside the opening two minutes when Adam Griffin saw a shot saved by goalkeeper Anthony Williams, but there was no more goalmouth action then until the quarter-hour mark.
Jason Taylor's long throw reached unmarked Stockport striker Adam Proudlock, but he headed wildly over the crossbar.
Griffin then stretched to reach a James Smith cross, but he couldn't divert his shot towards goal.
Wrexham had offered precious little up front early on, but they took the lead on 26 minutes. A high cross from debutant Neil Taylor reached the edge of the Stockport box, and Marc Williams just got in front of keeper Conrad Logan and his header rolled into the empty net.
It only took the hosts three minutes to level though. A long ball was inadvertently flicked on by defender Steve Evans, and there was Anthony Elding who powered home a cracking half-volley from 20 yards.
Elding stooped in to almost head a second minutes later and then Dominic Blizzard tried his luck from range, but his shot flew over the bar.
In first-half stoppage time, Anthony Williams raced out to deny Elding following a neat flick-on from strike partner Matty McNeil.
The visitors opened brightly after the break, with Mike Carvill firing a shot over early on.
However, just before the hour mark the home fans were screaming for a spot-kick as it appeared that McNeil was impeded by Simon Spender.
Wrexham responded with a Marc Williams shot that Logan saved superbly, while Stockport centre-back Gareth Owen shot wide from all of 35 yards.
However, the hosts did grab a winner on 65 minutes when Blizzard headed Paul Tierney's cross powerfully into the net at the far post.