Richard Carpenter's deflected strike stunned Swindon to put Brighton in control of their play-off semi-final.
Carpenter's deflected strike was enough to win the game
The Robins were left to rue their luck after missing a host of chances.
Sammy Igoe's first-half piledriver struck the post, while Tommy Mooney smashed the ball against the underside of the bar in the second half.
Mooney also missed a close-range header in the first half, before Carpenter's 72nd-minute shot beat Rhys Evans at his near post to seal victory.
Swindon will feel hard done by, but Brighton reaped the rewards for a solid defensive display, coupled with a slice of luck.
There was a tentative opening to the match with neither side creating much of a threat in the opening 20 minutes.
But as both sides settled, Swindon began to dominate possession.
However, it was not until 35 minutes that the first clear-cut chance arrived, and Mooney will be kicking himself for heading Sam Parkin's pinpoint cross wide.
35 mins: Igoe drives ball against post
63 mins: Mooney crashes ball against bar
72 mins: Carpenter's deflected strike seals win
Igoe's long-range effort bounced back into play off the post and was cleared by the Brighton defence, before Parkin fashioned a half-chance which he sent wide.
Swindon continued to press after the interval, but again found the Brighton defence in unforgiving mood.
Yet Mooney was desperately unlucky on 63 minutes, cutting across his marker to blast Grant Smith's cross against the underside of the bar.
Parkin was alert to the follow-up, but his header was tipped over by Brighton keeper Ben Roberts.
But with the game apparently heading for a 0-0 draw, Carpenter made the crucial contribution.
Gary Hart slid the ball into his path and Carpenter struck it well, although it would probably not have beaten Swindon keeper Evans without a wicked deflection.
But it means that Brighton take a slender lead back for the second leg at the Withdean Stadium on Thursday evening.
Swindon: Evans, Gurney, Heywood, O'Hanlon, Nicholas (Fallon 85), Duke (Smith 54), Hewlett, Igoe, Howard, Mooney, Parkin.
Subs not used: Griemink, Viveash, Reeves.
Brighton: Roberts, Virgo, Cullip, Butters, Harding, Reid (Hart 68), Carpenter, Oatway, Nathan Jones, Knight, Iwelumo.
Subs not used: Kuipers, Mayo, Piercy, Hinshelwood.
Booked: Knight, Harding.
Referee: N Barry (N Lincolnshire).