Stanningley, who needed to win both their last two matches to nick the silverware, dominated midfield for most of the first half and took an interval lead through John Mallinson.
Ben Cook equalised just after the hour mark as Farsley, who needed only a point to clinch the championship on the back of winning Division One last season, hit back.
The same player then edged his side in front and although defender Dave Webb headed the hosts level, Andy Cooper scored a breakaway winner.
Mid-table Calverley United finished in subdued style as they lost 8-3 on their travels to a Thornesians side who avoided relegation as a result of the three points.
Usual Calverley keeper Will Hardcastle played outfield and grabbed all three of his side’s goals, although he was outgunned by Ryan Dobson’s four for the hosts.
Hancock Cup winners Grangefield OB Reserves have enjoyed an excellent season but could not finish with a win as they were beaten 2-0 by visiting Woodkirk Valley in Division Two.
Marcus Benstead made it 13 goals in 15 games by netting both as Woodkirk climbed to fourth place, just behind Grangefield.
Heckmondwike GSOB wrapped up their season with a 3-1 win at FC Headingley Reserves to finish eighth in Division Three thanks to goals by Ash Mackereth, Niall Jowett-Wood and Daniel Sullivan.
This represents a splendid recovery after Heckmondwike spent the first half of the season in the relegation zone.