Richards grabbed the only goal of the game and his second in as many matches when Jimmy Spencer seized on a poor back pass by George Smith and drew James Montgomery out of goal before squaring to the right-back, who blasted his shot past two covering away defenders.
In a first half with few chances, Gateshead created the better opportunities, the first of which fell on 16 minutes when Kal Griffiths was allowed the chance to shoot, but offered a simple save for Steven Drench to make.
Farsley’s best opportunity of the opening 45 minutes came on 30 minutes as Spencer sped down the right before finding Carl Johnston, but the Fleetwood loanee could not find the target with his shot.
The visitors had a couple of good chances before the interval. Firstly a scooped lob from Jack Hunter found Jordan Preston in the box but Drench got down low to his left post to make the save. Then two minutes later, Farsley were caught napping from a drop ball situation as Hunter played an aerial ball over to Macauley Longstaff, but once again the experienced Drench dealt with the threat.
The Celts nearly took the lead on 56 minutes when Dave Syers was just inches away from connecting with Spencer’s cross.
Spencer then had a snap shot on goal himself, only to be denied by Gateshead goalkeeper Montgomery before Johnson also had a goalbound shot blocked as the hosts pushed for the victory.
With seconds left, Spencer latched onto a long ball which drew Montgomery off his line, and the striker then found Richards who fired past two defenders to spark celebrations on the home touchline.
After the game, Farsley manager Adam Lakeland said: “To a man, I can’t fault any of the players. I thought they were superb today.
“I thought Gateshead had the better of it in the first half and had a few chances but in the second half I felt we were the better team, we grew into the game and got on top of it.
“Jordan [Richards] has not got to the levels he set last season yet but he scored a great free-kick on Tuesday night and showed real quality and composure to keep his shot down and get it under the crossbar.”
Elsewhere in the National League North, Bradford Park Avenue have now equalled their best run of consecutive clean sheets since March 2014 following a 2-0 triumph over Alfreton.
Second-half goals from midfielder Jake Hibbs and Nicky Clee secured the points for the hosts while the defence held out for a third straight shut-out.
Guiseley’s home fixture with Kidderminster was postponed following a positive coronavirus test within the Lions squad.