Andre Gray sent Watford into the semi-finals of the FA Cup after coming off the bench to score the winning goal in their 2-1 victory over Crystal Palace.

They had been heading for extra time when, only three minutes after his introduction, he instead secured their route to Wembley — and their third win of the season via the same scoreline against the same opponents.

For the first time since their promotion to the Premier League in 2015, Watford are on course to end the season with something to play for.

Defeat, after Etienne Capoue gave the hosts the lead and Michy Batshuayi levelled, represented Palace’s third from four, and should their results not improve they will soon be at risk of relegation.

The visitors, already weakened by the absence of the influential Mamadou Sakho, were further undermined when fellow central defender Scott Dann joined the injured Wilfried Zaha in withdrawing, this time through illness.

Martin Kelly, Cheikhou Kouyate and Max Meyer therefore started in three changes from the team that last week lost at home Brighton, and while Watford had made eight changes it was the hosts who performed with a sense of continuity.

Beyond starting second-choice goalkeeper Heurelho Gomes, they essentially had a full-strength team having rested numerous regulars for their defeat at Manchester City in an attempt to finally prioritise the cup.

Luka Milivojevic tested the diving Gomes with a low shot from the edge of the area as early as the sixth minute, but thereafter Palace posed too little threat.

Watford’s lively Gerard Deulofeu forced a reaction save from Vicente Guaita when shooting from close range as they began to stretch the visitors, and after further pressure in the 27th minute they took the lead.

When Guaita came for and missed Jose Holebas’ right-wing corner, Craig Cathcart touched the loose ball to Capoue, who struck first time, high and just under the crossbar into the near-open goal.

When Meyer went close with a header early in the second half the visitors demonstrated signs of the belief they required to recover; Andros Townsend then forced Gomes to tip over when curling on target from a free-kick.

It was in the 62nd minute when, following an error from former Palace defender Adrian Mariappa, the on-loan Batshuayi levelled. Mariappa attempted to play out from defence when he should have cleared, and the alert Batshuayi charged the ball down into the path of goal, before shaping up and calmly finishing from inside the area and inside the far right post.

Again Guaita was at fault when his struggle to clear Adam Masina’s cross gifted possession to Roberto Pereyra, whose shot he then saved before watching Abdoulaye Doucoure stab the rebound narrowly over.

It was Pereyra who then created Gray’s decisive, 79th-minute goal. After running down the left he classily curled towards the striker, who from close range produced a similarly superb, first-time finish into the bottom left corner.

In stoppage time Aaron Wan-Bissaka had the chance to score the latest of undeserved equalising goals, but from just outside the area he shot narrowly wide.