Extra-time goals from Antoine Griezmann, Frenkie de Jong and Jordi Alba sealed a dramatic victory for Barca, who had trailed 2-0 until the 88th minute.
Late goals from Griezmann and Alba forced extra time after Kenedy and Roberto Soldado had scored for Granada.
Fede Vico briefly made it 3-3 from the penalty spot in extra time.
The visitors registered 36 attempts at Granada’s goal, 20 of which were on target.
Ronald Koeman’s side now joins Sevilla and Levante in the semi-finals, with Real Betis playing Athletic Bilbao in the final last-eight tie on Thursday.
Barcelona reached six consecutive Copa del Rey finals between 2014 and 2019 – winning four of those – but were beaten by Bilbao at the quarter-final stage last season.