The Clifton Parkers edged through 21-19 at Shipton Road against a tough Selby side which once again belied their lowly position towards the bottom of the table.
York scored tries from Will Dunlop and Ben Singleton and also benefited from crucial points from the boot of Liam Hessay.
Having led 18-5 at the break, they had to show considerable resolve in the second period as the visitors - who pushed high-flying Hullensians all the way last week - fought valiantly to get back into the game and bagged three tries of their own.
But, following their morale boosting victory at Bradford Salem a week ago, Denham believes his squad are starting to understand what he expects of them on the pitch as they develop in his first season in charge.
He said: "We played really well for 20 to 25 minutes and the rest of it was a hard fought game. Selby were fantastic. They played a really good shape and they were far better than when we played them at their place.
"Both teams were playing good, open and expansive rugby. It was fantastic and a really good game.
"The lads dug in and worked incredibly hard all the way through the game. It only takes three or four people to switch off at any time and you are in trouble and Selby scored two tries from us switching off.
"But I am more than happy with the win and I would like to think we have turned a corner. We have really concentrated on our skill base.
"The players are getting better and understanding the shape I want them to play and they are taking it onto the field."
Dunlop put York in front after ten minutes, Hessay converting well and the latter added two penalties as the home side stretched into a 13-0 lead.
It took 20 minutes for Selby to kick their way into the York half but, from a line-out, the Clifton Parkers failed to clear and, after a penalty, Duncan Hardy powered over for the visitors.
York skipper Chris Fox was yellowed card on 35 minutes for a high tackle but Selby couldn't capitalise from the attacking five metre scrum and Marcus Britland and Sam Blain combined well before Ben Singleton crashed over for a try out wide before the half concluded.
Hardy got his second try after the break, following another York fumble, and Scott Hunt converted as Selby were full of running. They took the lead at 19-18 when a good lineout throw was misread by the York defence and number eight Ben Booth strolled under the posts for Hunt to convert.
York seemed on the ropes but, from the kick off, the ball was fed to Hessay. Tackled just short of the line, Selby were caught offside and he calmly slotted home the winning score.
Despite playing for the second week in a row without a recognised scrum-half, a hindrance that will be eased by the return of both Toby Atkins and Ben Johnson to the squad for their trip to Heath next week, York once more showed a mettle that had been lacking at various points of the campaign.
"We have struggled in that eight-nine-ten area over the last two games," Denham explained. "But both Toby and Ben will be available this Saturday and that's going to be a welcome relief to be able to play an actual nine.
"We are in the process of turning a corner. It's nice to see the guys playing how I want them to play and, more than that, understanding why we are playing that way."