Wales defended stoutly, conceding just one try, to Wellington prop Anthony Perenise right on halftime when he ducked under a couple of tackles to end a period of good Samoan pressure.
There seemed a shortage of traditional Samoan exuberance as well at times.
The upshot is that Wales have five points, the same as Fiji, one behind Samoa and four adrift of South Africa, whom they should have beaten in Wellington eight days ago. If they'd done that, Wales would be sitting pretty. As it is there are still some twists on the path to a quarter-final spot against, quite possibly, the Irish.
Samoa had scrum problems, where Wales, with hairy Adam Jones a real warrior, ensured they had the better of the set piece.
Take out former Highlander Kane Thompson, who was outstanding at the lineout, and Samoa might have been battling there too.
There were walking wounded from an early point in the game. No surprises there.
The collisions were massive but initially it was Wales doing the damage, with wing George North and outstanding second five-eighth Jamie Roberts flattening Tasesa Lavea and Seilala Mapusua respectively.
The loss of flanker Dan Lydiate with a rolled ankle early on didn't help the Welsh cause while fullback James Hook failed to reappear after halftime with a shoulder injury.
Still hooking Hook had a silver lining in the shape of little Halfpenny, who buzzed about in lively fashion before seizing his moment. He could have been in a pickle with three blue-shirted men on top of him deep in Wales' half on their left. Somehow he wriggled clear and sped off down the left flank.
Centre Jonathan Davies took the inside pass, made ground but almost butchered the final delivery, only for little Williams - his nose for an opportunity still in good working order at 34 - to finish the job.
Wales will, however, reflect on one clear scoring chance early on, when lock Luke Charteris, strong value at the lineout for Wales, threw a forward pass to Roberts 10m from the lefthand corner. On his form thus far in the tournament, you'd have put your shirt on the big Cardiff man scoring.
There were 26 penalties - 14 to Samoa - and too much stop-start for this to rate truly top drawer. But it had tension and drama.
"At halftime [when Wales trailed 10-6] the boys knew the whole World Cup was about going out in the second half and digging deep," a proud Wales coach Warren Gatland said.
Before the end, players were on their haunches. It was tough, bruising work.
Wales can see quarter-final light; Samoa too, although as they have to face South Africa, it's rather dimmer.