In a titanic struggle, the score was locked 7-7 at the break with Tom Isaacs giving Wales the perfect start when racing over in the first minute. With Gareth Davies knocking over the conversion Wales then had to repel the physical Samoans.
Determined defence held them at bay until Alafoti Fa'osiliva finally broke through to score to give Fautua Otto an easy chance to level matters going into halftime.
Fa'osiliva's second converted try of the game edged Samoa in front but Wales struck back through Ifan Evans but the speedster was then sent to the sin bin to reduce Wales to six men.
Samoa used the extra man to their advantage to see Mikaele touch down from the last move of the game to send Wales packing to the Plate competition whereWales ran into a rampant Cecil Afrika.
The South African speedster has taken the opening two rounds of the tournament by storm and he proved the dominant figure in a narrow 22-21 victory.
He raced over for two tries in the first half, with Tom Isaacs responding with a touchdown which was converted by Rhys Jones.
Richie Pugh edged Wales in front early in the second spell before South Africa hit back through Kyle Brown, with Afrika adding the extras.
Aaron Shingler then stormed over for his sixth try of the tournament and with Davies adding the conversion Wales were left holding on grimly for the victory but Afrika had the last say with his third try of the match to finish with a personal haul of 17 points.