The Blues twice came from behind to edge past the second-tier side 4-2 in a captivating contest to reach the quarter-finals.