After going a goal down Neil Critchley's side showed great character as they fought back to gain an impressive win.
Just before the half-time break a surging run from Matty Virtue saw him brought down in the penalty area, and Sam Hart made no mistake with the spot kick.
Brannagan made it 2-1 with an excellent finish on 73 minutes, before Toni Gomes made certain of the victory 30 seconds later when he netted from close range after superb work from Yan Dhanda.
Reflecting on the final game of their Hungary tour, Critchley told Liverpoolfc.com: "This was a great way to end what has been a fantastic week over here in Hungary.
"We were again treated to lovely facilities and it was a good competitive game which is just what we wanted at this stage of pre-season.
"We would like to thank everybody for making us feel so welcome and looking after us on this tour."
Liverpool U23s: George, Whelan, Hart (Johnston 60), Phillips, Masterson (Parker 60), Jones, Coyle (Williams 60), Virtue (Brannagan 60), Gomes, Alves (Kane 60), Adekanye (Dhanda 60).