In the 20-year anniversary of their famous cup shock of Arsenal, Wrexham threatened to pull off another giant-killing through player-manager Andy Morrell's stunning strike midway through the first half.
But despite making most of the running, they could not find a second goal and Gus Poyet's side equalised on 77 minutes through Ashley Barnes to force extra time.
After a scoreless extra 30 minutes, the game went to penalties and substitute Dean Keates' opening spot-kick was saved by Peter Brezovan, with the Seagulls netting all of their penalties to eliminate the Blue Square Bet Premier leaders and set up a home tie against Newcastle in round five.
A frozen pitch caused the replay to be delayed by a day and the Championship outfit were still almost caught cold in the opening five minutes.
A short Jamie Tolley corner was whipped onto the head of Nathaniel Knight-Percival, who steered the ball narrowly wide of the post.
On 23 minutes the home side got the goal their pressure deserved, with the lively Danny Wright driving down the left wing before cutting the ball back for Morrell to curl into the top corner from 18 yards.
The visitors were still struggling to contain the marauding Wright and another foray down the left resulted in Brezovan keeping out a fizzing strike from Jay Harris.
Brezovan was again called into action early in the second half to smother Curtis Obeng's effort after he was played in by Adrian Cieslewicz.
At the other end Will Hoskins skied a chance over the bar on 60 minutes while an equally presentable chance was spurned by Glen Little, who replaced the injured Wright as a substitute, after Morrell's lay-off.
It was a miss that would become all the more glaring when Brighton equalised, as Wrexham failed to clear their lines and Sparrow dug out a terrific cross for Barnes to head in via the post.
Both Craig Mackail-Smith and Lewis Dunk passed up good opportunities to give Brighton the lead but in almost the last act of normal time, Joe Clarke sent a free header over the bar from Neil Ashton's corner.
Another Ashton corner early in extra time saw Mark Creighton fire in a header that was well saved by Brezovan but his Wrexham counterpart Joslain Mayebi produced even better stops to deny Torbjorn Agdestein and Romain Vincelot.
In a dramatic finale Harris saw his header tipped onto the bar for Wrexham, who missed their first spotkick when Brezovan dived to his left to keep out Keates' effort.
That proved the only miss from 12 yards as the visitors kept their composure from the spot, with Mackail-Smith scoring the decisive penalty to eliminate the last remaining non-league side.