Having beaten the Knights handsomely twice this season Ryan Carr's men looked set for another convincing win when they scored the first two tries and led 12-0 until the sin-binning of Dane Chisholm just before half-time proved the turning point.
While Chisholm was off York scored two tries to get back into the game at the break and Featherstone were only able to cross for one more try late on as their top five ambitions were dented.
Rovers made a flying start and were ahead inside two minutes as Wellington Albert and Brad Day made inroads and Alex Sutcliffe sent the ball wide for Jack Render to cut in and score. Chisholm added the conversion.
The visitors came close to another score soon after when Golding shot through a gap, but the referee ruled an obstruction.
They did add a second try on 21 minutes when Chisholm and Cameron King linked up to find Callum McLelland and the young half-back scooted over for a fine effort that was converted by Chisholm.
McLelland came close to another score when getting on the end of Chisholm's kick only to brought down on the last tackle.
The big turning point followed with Chisholm yellow carded for a professional foul according to the official when he held Jason Bass down in the tackle following a home break.
Within a minute York were over for their first points, Will Oakes sent in by Matty Marsh's miss-pass, and Connor Robinson converted.
The Knights took advantage of their extra man again just before the break as Kriss Brining charged over and although Robinson could not convert it was game on now at 12-10.
Featherstone struck first in the second half when Luke Cooper was held down too long after a tackle and Chisholm's return to the pitch saw him slot over the resulting penalty.
It was nip and tuck for a spell with both teams defending well. Closest to a score for Fev was when James Lockwood lost the ball close to the Knights line.
York began to turn the heat up after the hour mark and Robinson's grubber forced a goalline drop-out.
Rovers cracked under the pressure when Graeme Horne somehow forced his way over despite the attentions of several visiting players.
Robinson added the conversion and the Knights were ahead for the first time at 16-14.
In an exciting finish Featherstone were unlucky as Connor Jones kicked through and regathered only to stumble and lose the ball.
At the other end Liam Harris's kick was knocked dead by Render at the expense of a drop-out.
York then took advantage of the field position when Joe Porter handed off a Rovers player to go over for a try. With Robinson adding the goal it was 22-14 and Fev now needed two scores.
They managed one of them with two minutes to go as they spread the ball wide and Sutcliffe went over in the corner.
Chisholm was unable to add the goal from wide out and Rovers were unable to make any further inroads to lose 22-18.
Scorers - York: Tries Oakes, Brining, Horne, Porter; goals Robinson 3; Featherstone; Tries Render, McLelland, Sutcliffe; goals Chisholm 3.York City Knights: Marsh; Oakes, Salter, Bass, Whiteley; Harris, Robinson; Dixon, Jubb, Horne, Porter, Scott, Spiers. Subs: Brining, Baldwinson, Stock, Teanby.Featherstone Rovers: Golding; Render, Sutcliffe, Carey, Johnson; Chisholm, McLelland; Albert, King, Harrison, Day, Walters, Lockwood. Subs: Cooper, Davies, Jones, Makatoa.Referee: Tom GrantHalf-time: 10-12.