Nigel Farage’s right-wing populist party snatched a critical parliamentary seat from the governing Labour Party.