Barcelona showed remarkable resilience in a thrilling semi-final against Bayern Munich, winning 4-2 after initially leading by three goals.