With Luka Modric, Toni Kroos, Raphael Varane, Marco Asensio, Vinicius Junior and Dani Carvajal all out, Luca Zidane started in goal and Brahim Diaz made his full league debut for Madrid.
Huesca took an early lead against the understrength side named by the senior Zidane, with Cucho Hernandez beating the coach's son, but Isco equalised before half-time.
Dani Ceballos put Madrid in front before captain Xabier Etxeita equalised for Huesca, but a shock was averted as Benzema produced an excellent late strike to give Zinedine Zidane two wins from two.
Huesca had never played a competitive game at the Santiago Bernabeu before but they were ahead in the third minute.
Chimy Avila got the better of Nacho Fernandez on the right wing to pull back a low cross that Hernandez finished well.
Isco had been whistled after a loose pass and provided a fitting response when he equalised in the 25th minute.
Benzema sent Brahim Diaz clear then directed the youngster's return pass at goal, Roberto Santamaria making the save, but Diaz squared the rebound for Isco to tap home.
Santamaria was beaten again in the 62nd minute, Ceballos touching in at the back post after Benzema headed a Gareth Bale cross back into the danger zone.
Bale should have extended Madrid's lead, but he somehow miscued a close-range effort over the crossbar from Alvaro Odriozola's centre, and instead Huesca levelled it up.
Madrid were caught out by a short corner and Etxeita arrived behind Bale to steer home Moi Gomez's cross.
Huesca sensed an upset but were left broken-hearted at the death as Benzema capped a fine individual display with an excellent curling finish.
What does it mean? Work to do for Zizou
While that gives Zinedine Zidane time to assess his squad ahead of the 2019-20 campaign, motivation will prove difficult with nothing at stake and this seemed the case for much of Sunday's clash.
For Huesca, a seven-point gap to safety with nine games to go after their third straight LaLiga loss means the fate of Francisco Rodriguez's side is almost sealed.
Diaz lively on first LaLiga start
Opportunities have been restricted for Diaz since he joined from Manchester City in January, but the teenager created Isco's equaliser and generally impressed in a roving role from the left.
The emergence of Vinicius this season can offer Diaz inspiration for his future Madrid development.
Bale out of sorts
Having scored in Zinedine Zidane's first game back in charge, a 2-0 defeat of Celta Vigo, there were early signs Bale could have a future at Madrid following the coach's return after all. But he struggled to dominate against Huesca, with a free-kick sailing way over the crossbar summing up his lacklustre performance.
Although it was his cross that created Ceballos' goal, Bale had little else to show for his efforts and he should have avoided the need for Benzema's late heroics by converting a simple chance when Madrid led 2-1.
Key Opta Facts
- Isco has scored two goals in two games since Zinedine Zidane's return, one more than he had in his previous 16 appearances this season.
- Dani Ceballos scored his first goal for Real Madrid at the Santiago Bernabeu in all competition (five goals in total).
- Huesca scored their second quickest goal in LaLiga (133 seconds) – their first was against Barcelona at Camp Nou (123 seconds).
- The average age of Real Madrid's starting XI against Huesca was 26 years and 187 days, their youngest in LaLiga this season.
- Karim Benzema has assisted in three consecutive games in all competitions (three assists) for the second time in his Real Madrid career (four games in May 2013).
Both teams play again on Wednesday, with Madrid at Valencia and Huesca hosting Celta Vigo.