The Wanderers showed great resolve to come from behind twice and snatch just their second win of a difficult season and first at Pirtek Stadium.
Goals to Safuwan Baharudin and then Aaron Mooy - either side of Mateo Poljak's first-half equaliser - looked to have City on track for a vital win in their chase for the finals.
But the Wanderers weren't done, first getting level through a Tomi Juric penalty before Rukavytsya struck in stoppage time.
The winning goal came after City's Connor Chapman had been sensationally sent off for manhandling referee Strebre Delovski.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.