Barcelona won the first two matches of the best-of-five series, only for Valencia to force a decider by winning games four and five, but it was heartbreak for the hosts, who fell to an agonising 77-75 defeat..
With home advantage, Valencia will have been confident of completing a superb comeback, but it was Huertas who settled matters with the last play of the game as Barcelona reached an eighth consecutive Liga ACB finals.
Huertas put in a match-winning performance, the point guard leading his team with 22 points.
But the visitors had looked on the brink at half-time as Valencia moved into a 43-34 lead after the opening two quarters.
After that, Huertas helped galvanise his team, while Ante Tomic - who contributed 20 points - played his part in a third period that saw Barcelona outscore the hosts by 13 points.
Valencia refused to lie down, however, and Velimir Perasovic's men appeared to have forced overtime when they tied the score at 75-75.
Huertas ensured Valencia's efforts were in vain, though, as he sunk a two-pointer in the last second of the action.
The result means Barcelona will meet Real Madrid in the Liga ACB finals for a third consecutive season, after Pablo Laso's men defeated Unicaja Malaga in the other semi-final.