A 1-0 defeat at Zagreb on September 6 triggered the sacking of former Blues manager Thomas Tuchel, but Potter saw his side return to winning ways after the weekend defeat to his former club Brighton.
Despite going behind to Bruno Petkovic's early goal, Raheem Sterling equalised before on-loan Juventus midfielder Zakaria - who has had to wait for a chance to impress, struck.
Zagreb went into the game requiring a win and a RB Salzburg defeat to reach the Europa League, but were unable to get the required result in London.
There was a concerning moment for Chelsea in stoppage time when England international Ben Chilwell was forced off after going down clutching his left hamstring.
Only seven minutes had passed when Zagreb briefly gave their hopes of finishing third a boost when Petkovic headed the visitors into the lead from close range.
Ten minutes later Sterling levelled with his first Chelsea goal since September 14.
The 27-year-old picked up the ball on the edge of the box from a Pierre-Emerick Aubameyang flick-on, weaved space to shoot from and then drilled low into the back of the net.
The home side had a chance to go ahead in the 26th minute, as Kalidou Koulibaly tried to guide the ball goalwards with a header from a corner, but it was over the bar.
Sterling also had a chance to add to his and Chelsea's tally just before the half-hour mark after being picked out by Kai Havertz but his first-time hit sailed over the goal.
However, Chelsea were soon rewarded for their opportunities when Zakaria sent a low drive past goalkeeper Dominik Livakovic. Defender Sadegh Moharrami was on the post and managed to get a boot to the ball, but was unable to prevent it crossing the line.
At the start of the second half, Zagreb came close to finding an equaliser, but Edouard Mendy was equal to Josip Sutalo's header.
The game continued end-to-end with Aubameyang seeing a drive from distance rebound off the crossbar.
Mason Mount went close to adding to Chelsea's advantage with a free-kick which forced a save from Livakovic, and Conor Gallagher had an effort saved in the 85th minute.
Chelsea had another chance to cap off their victory in stoppage time, but Livakovic was equal to an attempted tap-in from Gallagher less than five yards out.