Valley were stunned by Racing Club Warwick substitute Andre Williams' stoppage time 30-yard strike to take all three points at Townsend Meadow.
After a closely fought game, Williams struck with practically the last kick of the game when he fired in from long range via the underside of the bar.
It was a cruel ending after another encouraging display from Ian King's new charges, with Liam Francis stepping in for the injured Josh Thomas representing the only change to the team that started Town's first victory in eight games on Boxing Day against Bedworth.
Rugby started the game brightly with Trey Charles firing a shot from a tight angle, and then Madundo Semahimbo warmed the hands of Sam Lomax with a shot straight at the ex-Valley stopper.
Another decent effort from Semahimbo was deflected just wide after the winger had made a good run into the penalty box, with Town's best opportunity of the opening half coming when Caine Elliott's excellent pass released Charles to send in a dipping strike that Lomax did well to push over the bar for a corner.
Valley then had a strong shout for a penalty turned down by referee Richard Walker when Harrison Nee appeared to have been pushed in the back, before Warwick ended the half with their only real effort on goal when Louis Monaghan probably should have done better with his strike from a good position, but he could only bump his shot into the ground to allow Town keeper Paul Hathaway to make a relatively comfortable save.
Having edged the first half, hopes were high that Town would step things up further and secure back-to-back league victories for the first time this season.
Nee's strike just after the restart which was palmed away for a corner by Lomax gave them further encouragement early in the new period, but the hosts started to get themselves into the game more and won themselves a penalty-kick on 58 minutes when Semahimbo got the wrong side when attempting to tackle Cameron Ebbutt.
Hathaway's excellent diving save to his right denied another one-time Town player James Hancocks the opener from the spot though, and the visitors responded well to the escape route provided by Hathaway with Nee's on-target effort saved by Lomax and then Semahimbo also missing out with his attempted lob from distance.
Warwick's Archie Hemp struck the post with a swirling deep cross with just five minutes remaining as the game started to open up a little, and then Hathaway just managed to get the ball clear as Racing looked to scramble one home.
With the match into added-time, Valley had the perfect opportunity to grab a late winner when Nee dinked up a cross to the back post and sub Tayo Tucker failed to hit the open target from a few yards out - and instead headed the ball down into the ground and over the bar.
Town were then cruelly punished for that miss when Williams won the ball in the centre circle before running on to fire home his effort from distance via the crossbar to deflate both the Town players and their loyal, fervent band of supporters behind the other goal.
Valley Line-up: Hathaway; Summerfield, Lekuti, Brown, Francis; Clements, Elliott, Berry; Semahimbo (Tucker 78'), Nee, Charles (Obeng 87'). Subs not used: Mensah, Osoimoejiokhian. Booked: Summerfield, Charles, Nee.