Gray latched on to Roberto Pereyra’s chipped ball into the area and volleyed in left-footed in the 79th minute as Watford became the first team to book a place at Wembley Stadium.
Etienne Capoue had given Watford the lead in the 27th minute when a corner was diverted into his path and he stabbed the ball in from 10 yards. But Palace leveled in the 62nd when Watford failed to clear the ball and Michy Batshuayi won possession before breaking into the area and firing past Heurelho Gomes.
Gray then entered in the 77th and had only been on the field for two minutes before delivering the winner.
“Obviously, every player is disappointed if they don’t start,” Gray said. “There’s two ways of going about it, you either sit there and sulk or you get on with it, and I’ve been on the bench quite a lot this season so I’ve got my mind around it now. I just have to come on and make a difference.”
Later Saturday, Manchester City will try to stay in contention for a possible four titles when it faces Swansea in another quarterfinal before Manchester United travels to fellow Premier League side Wolverhampton Wanderers.