Greig Laidlaw produced another fine display from the tee to knock over six penalties for the Scots but it wasn't enough to back up their earlier successes against the Italians and Irish.
With the Scots 6-3 in front, Hibbard powered over from close-range after 21 minutes following strong work from George North down the right-hand side as Wales finally made their early dominance pay.
Halfpenny surprisingly failed with three kicks at goal before Hibbard crossed for his first international try but the inform fullback didn't miss the target again from there on in as he ended with seven penalties and a conversion to his name.
Laidlaw's accuracy seemed set to see Scotland hold a 12-10 lead at the break despite enjoying less possession and territory but a needless infringement from Jim Hamilton enabled Halfpenny put Wales back in front on the stroke of half time.
The second period was even more heavily dominated by the boot in difficult conditions, with Wales pushing on after Laidlaw had pegged them back to 16-15 with half an hour remaining.
Halfpenny hit further penalties after 56, 59, 68 and 72 minutes and the game was as good as dead by the time prop Paul James was yellow carded for a ruck offence with just over two minutes remaining.
Wales now head back to Cardiff after three successive away games knowing they could still win the Championship with victory over England.
Stuart Lancaster's men hold a slight points advantage ahead of tomorrow's game with Italy but Wales will at least have a mathematical chance of jumping above them, even though they may be left chasing a huge win at the Millennium Stadium on Saturday.