The comeback started in the 43rd minute when Fidel Martinez netted, and Duvier Riascos levelled up the tie in the 68th minute.
That meant it was anyone's game but, just as it seemed the match was heading into extra time, substitute Ruiz struck to make it 3-0 on the night and send Tijuana through to face Toluca.
Toluca too flirted with drama in a 2-1 loss to Club America which saw them sneak through 3-2 on aggregate.
Having lost the first leg 2-0, America worked quickly to level the tie with goals from Miguel Layun (15) and Daniel Montenegro (36).
There was no fairytale for the visitors though as Edgar Benitez netted in the 59th minute for Toluca.
America's disappointment was capped off by a red card for Juan Carlos Medina in the last minute.