The midfielder had been on the pitch for barely 90 seconds when he let fly from 25 yards to seal a 2-1 win for Championship Fulham.
Defeat may well end up being a blessing in disguise for Villa, however, as they battle to stay in the Premier League and begin their bid for a place in Carabao Cup final against Leicester on Wednesday.
These sides last met at Wembley in the 2018 Championship play-off final when Fulham clinched promotion.
They went straight back down and now, with Villa threatening to do the same and Fulham in the play-off spots, priorities for both clearly lay elsewhere.
A scrappy first half almost came to life when El Ghazi danced into the Fulham penalty area and found Jonathan Kodjia, who took a touch but lashed his angled drive just over the crossbar.
Then Henri Lansbury swung in a free-kick which Ahmed Elmohamady headed across goal and wide before El Ghazi’s drive skidded the wrong side of the near post.
With the last kick of the first half El Ghazi had the best opportunity but Fulham keeper Marek Rodak made a fine save with his legs.
Early in the second half Knockaert cut inside from the right and sent a curling shot inches wide.
It proved to be the perfect sighter as, in the 54th minute, the winger repeated the trick, dancing past Marvelous Nakamba and, this time, launching a superb shot past Nyland into the top corner.
Cyrus Christie almost made it two at the far post but his effort was saved by Nyland and the rebound, off Christie’s face, had to be cleared off the line.
Instead Villa hit back in the 63rd minute when Michael Hector, making his long-awaited Fulham debut after signing from Chelsea in September, lost Kodjia on the edge of the box.
Kodjia lifted the ball over Rodak towards an empty net, where El Ghazi tapped the ball in from all of six inches out.
But Arter was introduced in the 72nd minute and his first contribution settled the match, leaving Nyland with no chance as he launched his looping, dipping shot into the top corner.