In a nail-biting finish the Wales' defence was breached twice in the final minutes - first by Keith Matthews, and then Richard Lane - but thanks to the 15-point advantage Wales had established in the opening quarter, the home side held on to win 20-19.
The visitors outscored the home side by three tries to two, but the superior kicking of Cardiff outside-half Nicky Robinson proved decisive.
His Ireland counterpart David McAllister missed four first-half shots at goal, whilst Robinson ended the game with 15-points to his name.
Wales led 7-5 at the break, but only after Irish fly-half David McAllister had kindly missed four shots at goal.
Ireland stunned the home support by scoring the game's opening try after just three minutes. The burly Irish pack drove towards the posts and quick ball out to the left resulted in winger John Hearty diving over in the corner.
Wales hit back on the 20-minute mark when Swansea's Jonathan Thomas secured the lineout and the pack drove towards the line. Impressive young hooker Hew Bennett, who would be on the bench against Ireland today if Jonathan Humphreys had failed a fitness test, peeled off and went over untouched. Robinson added the extras.
Ireland had the better of the half, but the best scoring chance fell to the home side when Robinson sent out a long pass to fullback Gareth Swales, who drew the defender being in-passing to centre Johnny Vaughton. The try-line was begging to be crossed, but the Swansea youngster couldn't control the difficult pass.
Italian referee Antoni Lombardi sin-binned Cardiff backrower Robin Sowden-Taylor late in the half, but McAllister couldn't convert the simple shot at goal.
Robinson extended the lead with a 44th-minute penalty goal, before Vaughton made a superb break to set up a ruck on the Irish line. Quick ball was fed out to Robinson who scored near the posts before adding the extras.
As the second half clock ticked down, Irish lock David Gannon was sin-binned for killing the ball, but his loss seemed to inspire the visitors. They hit back with a try to centre Keith Matthews before Robinson went from hero to zero when he spilled the ball to give Irish winger a free 50m run to the posts. McAllister converted both tries to set up the tense finale.
Wales coach Chris Davey said: "We didn't really get it going today.
"It was a disappointing first half, although I couldn't understand some of Mr Lombardi's decisions. I thought he de-powered the scrum and was far too quick blowing it up in the tackle area.
"I think both sides were more intent on not losing the game than winning, but now we go to France with all to play for."
Wales - Tries - H Bennett, N Robinson; Cons - N Robinson 2; Pens - N Robinson 2.
Ireland - Tries - J Hearty, K Matthews, R Lane; Cons - D McAllister 2. Halftime: Wales 7-5.
Wales Under-21: G Swales; W Kershaw-Naylor, J Vaughton (N Brew 60), G Henson, M Nuthall; N Robinson, M Phillips; P James (capt), H Bennett, R Thomas, B Griffiths, J Thomas, M Lewis, R Sowden-Taylor (R Pugh 75), J Malpas.
Ireland Under-21: T Bowe; R Lane, B Murphy, K Matthews, J Hearty; D McAllister, F O'Loughlin; J Lyne, R Best, D Fitzpatrick, D Gannon, N McComb (S O'Connor 55), C Potts, N Ronan (J Muldoon 68), S Keogh (capt).