The Green Party’s Hannah Spencer triumphed in the Gorton and Denton by-election, with Reform’s Matt Goodwin coming second.