Ireland led 8-3 at half time, then went 18-8 down within ten minutes of the restart but fought back courageously to snatch a deserved victory.
Andy Dunne gave Ireland an early lead when he scored a try in second minute and the out-half added an injury time penalty to leave his side 8-3 in front at half-time.
However it looked like Samoa would win comfortably when they scored fifteen unanswered points at the start of the second half.
The introduction of Mick O'Driscoll in the 49th minute improved Ireland's supply of line-out ball and with Sheldon Coulter tackling everything that moved, the Irish began their comeback
In the 21st minute Des Clohessy reduced the deficit with a try following a good drive from a line-out and then Andy Dunne's neat break set up the equalising try for Coulter.
Killian Keane's conversion put Ireland in front and the Garryowen man ended the afternoon by kicking a fine touchline penalty to complete the scoring and send Samoa away with plenty to think about ahead of next Sunday's full international against Ireland.
D O'Sullivan; J McWeeney, S Coulter, K Keane, S Keogh; A Dunne, K Campbell; D Clohessy, J Fogarty, P Wallace (M Cahill 70min); D O'Callaghan, A Kearney (M O'Driscoll 49 min); L Toland capt, C McMahon, A McCullen.