The Wales international scored his first league goal in 802 minutes of football to give Santiago Solari's men the lead at El Alcoraz and they withstood some nervous moments to emerge with all three points.
LaLiga debutant Huesca went into the game without a victory since the opening day of the season but it restricted the European champion to a season-low of two first-half shots.
Bale, who shook off a knock in time to start the match, looked dangerous throughout and could have added to his tally, but Solari will have been frustrated by the ease with which Huesca might have equalised had their finishing been less wayward.
Bale's poor league form had drawn criticism before the game but he calmly stroked Madrid into the lead after eight minutes, meeting Alvaro Odriozola's cross with a side-footed volley from 12 yards out that found the corner of the net.
Huesca almost equalised when Ezequiel Avila's thunderbolt of a shot from just inside the box was saved by Thibaut Courtois, but settled for a one-goal deficit at half-time having weathered numerous Madrid attacks.
Substitute Gonzalo Melero headed wide from point-blank range in the opening seconds of the first half, and team-mate David Ferreiro had a dipping drive from the edge of the box tipped over the crossbar by Courtois.
Bale surged down the left flank moments later and forced Aleksandar Jovanovic into a sprawling save, the former Tottenham man not punished for then dinking narrowly wide when one-on-one with the goalkeeper as his first-half strike proved sufficient.