Jose Bordalas's side won a bad-tempered first leg 2-0 against last season's Champions League semi-finalist and extended its advantage in the fifth minute of the reverse fixture when Jaime Mata struck.
That left Ajax needing four goals to progress but Danilo, making his first start for the club, tapped in Donny van de Beek's low cross five minutes later to equalise on the night.
Carel Eiting whipped a deflected free-kick past David Soria in the 63rd minute to give Ajax some hope, though Getafe progressed despite being denied by the woodwork on three occasions.
Elsewhere in the round of 32, Istanbul Basaksehir produced a stunning comeback to knock out Sporting CP 5-4 on aggregate, Edin Visca scoring the winner in extra time, while Shakhtar Donetsk beat Benfica 5-4 on aggregate after a thrilling 3-3 draw in the second leg in Lisbon.
Sevilla, winner of the Europa League three times in a row under Unai Emery between 2014 and 2016, edged through its tie with Cluj on away goals after a 1-1 aggregate draw.
The Romanian champion was denied a famous victory when Alexandru Paun's late strike was ruled out after a VAR check that ruled Lacina Traore handled the ball.
Last year's finalist Arsenal crashed out in extraordinary circumstances with captain Pierre-Emerick Aubameyang's overhead kick having seemingly secured the Gunners' progress only for Youssef El-Arabi to strike in the last minute of extra time to send Olympiacos through on away goals.
Manchester United, Inter, Roma, Wolfsburg and Bayer Leverkusen were among the major sides to progress, with the draw for the last 16 set to be made in Nyon on Friday.