After a goalless first-half, Scott Hogan opened the scoring for the senior team before Bees midfielder Jack Taylor equalised from close range for the U-21s just a minute later.
With the match heading for a draw, Taylor scored his second goal of the game as his 25-yard deflected effort found its way past goalkeeper Sean McDermott in the final minute of the game.
When asked about Taylor’s performance, manager Mick McCarthy stated:
“It was better than not bad! Stephen (Kenny) saw him at a cup game, obviously caught his eye, brought him in and he got the two goals that counted today – he played well in the game.”
The Republic of Ireland Under 21’s begin their Toulon Tournament campaign on Monday against China, 14:30 kick off GMT.