But Stones drew level through Stuart King midway through the second half, against the club he left a few weeks ago, and Ade Olorunda then put them ahead with only 11 minutes to go.
Folkestone made it 2-2 with an 84th-minute effort from Darren Smith but, despite that, it turned out to be a good day for Maidstone as main title rivals Dulwich suffered a surprise 3-1 defeat at Merstham.
Fabio Saraiva opened the scoring four minutes before the interval and it was 3-0 by the hour thanks to goals from Henriques Mthuthuzeli and Joe Holland. Luke Hickey replied with nine minutes left.
Dulwich are six points behind Stones with three games in hand, and they forfeited second place to Faversham who won 2-1 at Horsham.
Jordan Clarke put Hornets in front with a ninth-minute penalty but Dan Lawrence squared it again two minutes later and Lynden Rowland pounced on a loose ball to net what proved to be the winner in the 33rd minute, though there were plenty more chances at both ends in a lively affair.
Ramsgate are right in the play-off hunt after thumping fourth-placed visitors Leatherhead 4-1. James Sherman’s early goal for the hosts was answered by Tommy Hutchings on the half-hour.
Ben Laslett quickly restored Ramsgate’s lead and second-half goals from Dean Hill and Ian Pulman completed a decisive victory.
Honours were even at Walton & Hersham, who took the lead through Chris Wales just before half-time only for Mu Maan to reply for local rivals Walton Casuals two minutes after the restart. The 1-1 draw gave Casuals a seven-point lead over bottom club Three Bridges.
Keep up-to-date with our exclusive email newsletters.
Subscribe