Ozil was a picture of composure as he ran through on goal, chipped the keeper and cut inside two defenders before slotting in from close range for a dramatic winner.
Earlier on, Arsenal's hopes of a repeat of their 6-0 win in the reverse tie were quickly dispelled when Jonathan Cafu put Ludogorets in front against the run of play by steering in a left-footed volley from a Wanderson free-kick.
Cafu turned provider three minutes later as he jinked past Kieran Gibbs and squared a ball for Claudiu Keseru to turn in as the Bulgarian side shocked the Gunners with a second in a frantic opening.
Granit Xhaka guided in a 15-yard shot from an Ozil cross to pull one back for Arsene Wenger's side before Olivier Giroud expertly headed in Aaron Ramsey's clipped cross to equalise.
Arsenal keeper David Ospina twice saved from Wanderson before Ozil secured his side's progress into the last 16 and extended their unbeaten run to 15 games.
Relive Ludogorets Razgrad v Arsenal
One of the highlights of Arsenal's season so far has been the goalscoring form of Ozil. The German playmaker has already taken his tally this season to seven, having scored eight for the Gunners in total last term.
He should have opened the scoring early on when Francis Coquelin played him through on goal, but he struck a tame shot that was easily saved.
Ludogorets punished the miss with two goals, but Ozil then played a key part in Arsenal's recovery as he gesticulated for his team to increase their effort.
He set up Xhaka for his first Champions League goal and timed his run to perfection to meet Mohamed Elneny's pass on the way to his goal, adding to his hat-trick in the first game against Ludogorets at the Emirates.
Ozil has now been directly involved in eight goals in his past five games for Arsenal in all competitions, with five goals and three assists.
Arsenal manager Arsene Wenger said his side's "prime target" was to win Group A in order to avoid playing tougher opposition.
The Gunners have gone out at the first knockout stage of the Champions League in the past six seasons, having last won their group in 2011-12.
Wenger's side showed vulnerabilities at the back when Ludogorets went on the counter-attack, but they demonstrated spirit and character to recover. This means they could be ready to avoid the capitulations which have marred previous European and Premier League campaigns.
Arsenal's mental strength will again be tested when they face Tottenham followed by Manchester United in the league before what could be a decider to finish top of Group A when they host Paris St-Germain.
The energy and goals of Alexis Sanchez playing as a central striker have proved a major success for Wenger this season.
However, with Giroud returning to fitness and scoring two key goals in Saturday's top-flight win at Sunderland, Wenger chose to give the Frenchman his first start of the season against Ludogorets with the job of leading the Gunners' attack.
Sanchez was shifted out to the left wing and, initially, it seemed to reduce the Chile international's threat as well as Arsenal's.
But Giroud did score the equaliser and Wenger now has to decide which attacking formation works best for his side in the key games coming up.
Arsenal manager Arsene Wenger speaking to BBC Radio 5 live: "You wanted Mesut Ozil to take his chance earlier, but in the end he shows he has enough skill to prove he was right.
"I believe the hardest thing is to be consistent at the top level, but hopefully we can now go further [in the competition].
"We need to maintain the quality of our results until the match against Paris St-Germain and then hopefully we will be in a position to finish top of the group."
Arsenal are next in action against north-London rivals Tottenham on Sunday at midday. Their two remaining Champions League games are at home to PSG on Wednesday, 23 November and Basel on Tuesday, 6 December.
Match ends, Ludogorets Razgrad 2, Arsenal 3.
Second Half ends, Ludogorets Razgrad 2, Arsenal 3.
Foul by Mesut Özil (Arsenal).
Anicet (Ludogorets Razgrad) wins a free kick in the defensive half.
Attempt blocked. José Luis Palomino (Ludogorets Razgrad) header from the centre of the box is blocked. Assisted by Wanderson with a cross.
Corner,  Ludogorets Razgrad. Conceded by Alex Oxlade-Chamberlain.
Substitution, Arsenal. Alex Iwobi replaces Alexis Sánchez.
Francis Coquelin (Arsenal) wins a free kick in the attacking half.
Foul by Virgil Misidjan (Ludogorets Razgrad).
Goal!  Ludogorets Razgrad 2, Arsenal 3. Mesut Özil (Arsenal) left footed shot from the centre of the box to the centre of the goal. Assisted by Mohamed Elneny with a through ball.
Substitution, Arsenal. Mohamed Elneny replaces Granit Xhaka.
Offside, Arsenal. Alex Oxlade-Chamberlain tries a through ball, but Mesut Özil is caught offside.
Foul by Laurent Koscielny (Arsenal).
Jonathan Cafu (Ludogorets Razgrad) wins a free kick in the defensive half.
Laurent Koscielny (Arsenal) wins a free kick in the defensive half.
Foul by Marcelinho (Ludogorets Razgrad).
Attempt missed. Alex Oxlade-Chamberlain (Arsenal) right footed shot from the centre of the box misses to the right. Assisted by Mesut Özil with a cross.
Foul by Granit Xhaka (Arsenal).
Virgil Misidjan (Ludogorets Razgrad) wins a free kick in the defensive half.
Foul by Carl Jenkinson (Arsenal).
Wanderson (Ludogorets Razgrad) wins a free kick on the left wing.
Substitution, Ludogorets Razgrad. Virgil Misidjan replaces Claudiu Keseru.
Foul by Shkodran Mustafi (Arsenal).
Cosmin Moti (Ludogorets Razgrad) wins a free kick in the defensive half.
Alexis Sánchez (Arsenal) wins a free kick on the left wing.
Foul by Wanderson (Ludogorets Razgrad).
Corner,  Arsenal. Conceded by Svetoslav Dyakov.
Substitution, Arsenal. Alex Oxlade-Chamberlain replaces Aaron Ramsey.
Olivier Giroud (Arsenal) wins a free kick in the defensive half.
Foul by Svetoslav Dyakov (Ludogorets Razgrad).
Foul by Alexis Sánchez (Arsenal).
Svetoslav Dyakov (Ludogorets Razgrad) wins a free kick in the defensive half.
Attempt missed. Jonathan Cafu (Ludogorets Razgrad) right footed shot from the left side of the box is too high. Assisted by Wanderson.
Foul by Carl Jenkinson (Arsenal).
Wanderson (Ludogorets Razgrad) wins a free kick in the defensive half.
Carl Jenkinson (Arsenal) is shown the yellow card for a bad foul.
Foul by Carl Jenkinson (Arsenal).
Wanderson (Ludogorets Razgrad) wins a free kick on the left wing.
Foul by Kieran Gibbs (Arsenal).
Jonathan Cafu (Ludogorets Razgrad) wins a free kick on the right wing.
Mesut Ozil scored a stunning late goal as a resilient Arsenal came back from 2-0 down to beat Ludogorets Razgrad and reach the Champions League knockout stages.