Barnsley opened the scoring through Max Watters but the Hornets hit back through Shamir Fenelon and James Hammond’s penalty.
But the hosts restored parity before the break thanks to a Fabio Jalo wonder-strike.
Mael De Gevigney headed Barnsley in front just after the hour, but second half substitute Richards sensationally levelled with nine minutes to play to force an unlikely replay.
The Tykes had the first clear-cut opportunity of the game on 13 minutes. John McAtee showed Bobby Price a clean pair of heels, but Lewis Carey did well to tip the Barnsley striker’s fierce effort over the crossbar.
However, from the resulting corner, the ball came out to Jamie McCart who fired an inch-perfect cross into the area for Watters to head home from close range.
Watters then glanced a header across the face of Carey’s goal – but, against all odds, the Hornets found themselves level.
Daniel Ajakaiye left two Tykes defenders in the dust before slipping a superb ball to Fenelon, who poked an excellent finish into the top corner past Barnsley keeper Ben Killip.
The host came within inches of restoring their lead just moments later when Owen Dodgson's free-kick from the left was side-footed onto the bar by Callum Styles in the box.
Carey then made an excellent save to deny Jalo's curling effort in the area, before Ajakaiye rounded Killip but failed to apply the finishing touch.
Carey came to the rescue again moments later, making a super save down to his left when a second Barnsley goal looked certain.
But – to the disbelief of home supporters and delight of the travelling Lardy Army – Horsham found themselves in front with seven minutes of the half remaining.
READ THIS: Dominic Di Paola hails ‘absolutely phenomenal’ Horsham performance as Barnsley are held in FA Cup barnstormer
Barnsley head coach Neill Collins praises dauntless Horsham after never-say-die performance at Oakwell
Another buccaneering Ajakaiye run was brought to a premature end by De Gevigney in the area. A penalty was awarded by referee Ben Toner, which Hammond duly hammered home.
But the hosts found an equaliser on the stroke of half-time – and in some style too. Jalo cut inside onto his left and whipped a fierce shot into the top corner.
After a breathless first 45 minutes, the opening stages of the second half were a quiet affair.
The first real chance of the half fell to the hosts on the hour mark. Dodgson let fly with a venomous 25-yard effort but Carey superbly got down to his left to keep out the Barnsley man’s piledriver.
But the Tykes took the lead on 63 minutes. De Gevigney glanced his header home from a corner to the visible relief of the home supporters.
The Hornets showed they were still in the game, despite tiring legs. Second half substitute Lucas Rodrigues stole the ball from De Gevigney but he couldn’t escape the attentions of O’Keeffe when almost clean through on goal.
Carey then made three incredible saves to keep the Hornets tie. McAtee, Styles and Luca Connell were all kept at bay by the Hornets keeper before Connell put the final effort into the side netting.
But, in a lightning Horsham counter attack, the visitors summoned up all their energy to find a late equaliser. Rodrigues squared the ball for fellow substitute Richards to tap into an empty net as the Barnsley defenders fiercely remonstrated with the referee over a potential offside call.
The Tykes had two golden opportunities to win the tie at the death. Adam Phillips screwed his close range effort wide with the goal at his mercy, before Styles fired into the side netting.
Barnsley FC: Killip, Williams, De Gevigney, McCart, O’Keeffe, Styles, Kane (Connell 62), Dodgson, Jalo (Phillips 71), Watters (Cadden 62), McAtee.
Unused: Flavell, Benson, Cotter, McCarthy, Shepherd, Cole.
Horsham FC: Carey, Price, Sparks, Strange, Barker, Hester-Cook (Rodrigues 46), Brivio, Hammond (Myles-Meekums 75), Harding (Tuck 75), Ajakaiye (Daniel 64), Fenelon (Richards 75).
Unused: Lelliott, Kavanagh, El-Abd, Harris.
Attendance: 4,463 (563 away)