Fulham took the lead in the 51st minute when Juninho Bacuna hacked an awful clearance into the air with Aleksandar Mitrovic climbing above Tommy Elphick to profit on the error by nodding home at the back post.
The advantage lasted only six minutes as Grant's third goal of the season levelled the scores, the striker's header narrowly crossing the line despite the best efforts of Cottagers goalkeeper Marcus Bettinelli.
But Fulham followed a 2-0 home win over Blackburn Rovers last time out with another three points against a fellow relegated outfit, which is yet to win this term, when Cavaleiro whipped in a fantastic finish in the 80th minute.
Not long after the game, Huddersfield announced it had sacked manager Jan Siewert. The German had overseen one victory across seven months in charge.