Stephen Kenny has his first win as Republic of Ireland boss at the 12th attempt.
In usual circumstances this would have been a low key friendly but there was no question that this game was a must win for the Boys in Green.
Andorra may be ranked 158th in the world but they frustrated Ireland for large parts of the first-half.
Kenny's men dominated possession but found it hard to create meaningful chances.
Conor Hourihane looked threatening for Ireland pinging a number of good crosses into the box but strikers James Collins and Troy Parrott struggled to get on the end of any of them.
It was scoreless at half-time but Kenny kept faith in the same 11 for the beginning of the second-half.
Ireland were shocked in the 52nd minute as Vales found himself free in the box to head home the opener from a cross.
With Ireland in need of someone to step up, Parrott did exactly that just five minutes later.
He drove into the box and fired home a low shot to equalise.
Minutes later Ireland had the chance to take the lead as Parrott put it on a plate for Ronan Curtis who fluffed the chance from close range.
Just after the hour mark he had his second as he jumped highest to head in a fine cross from Hourihane.
It was a huge relief for Kenny but well deserved as Ireland were dominating the game having gone behind against the run of play.
With 25 minutes to go, Adam Idah and Daryl Horgan replaced Collins and Curtis and both players had an impact on the game.
Idah's presence up front helped Ireland hold up the ball and create more chances for the midfielders.
One of these chances saw Kenny's men seal the win with seven minutes to go.
Horgan's stunning cross was converted by Jason Knight to make it 3-1.
The roles were reversed in the 89th minute as Horgan scored a header from Knight's cross.
Next up for Ireland is a friendly against Hungary in Budapest on June 8th.