Commonwealth was building AGIs and they sent around 1,5 trillion drones to Sol. Terrran fleets wore pretty much destroyed and only way to save Earth was to open gate in to black hole. AGI drones wore tricked and they went trough gate and got sucked it to black hole and after that gates started to shut down. Terran colonists in HOL wore refuges running away when those drones attacked Sol (they thought Earth was going to get destroyed. At same time Xenon started massively invading other Commonwealth races because they wore weak from war against Terrans and they couldn't use AGI against Xenon. So ancients shut gates down to prevent total destruction of Earth and Commonwealth races. Also from what I have found that ancients are fighting some other race from different galaxy that is more advanced to them...
IMO the whole Ancient gate shutdown to contain Xenon is an absurd as someone already mentioned that they cannot be contained in that way.
Aslo the fact that X-Rebirth "micro-universe" already connected to 5 Xenon infested system (Maelstorm, Teladi Outpost, Torride, HoL, Cold Start) deny this - why shut down the systems only to reconned them again to infested ones?
IMO more plausible is that the connecting gate to black hole to save Earth cause general Gate Network malfunction and Ancients had to shut it down as emergency to prevent critical failure. Thus in the events of X-Rebith the whole network begin to reconnect after "hard-reset".
Not to mention that Terrans can already be gate independent if they restart and upgrade the X-Shuttle program. Lore wise Terran gate in Neptune shut down along with Acient gates, but I assume it's because it coundn't connect to anything else in the galaxy (Any other Ancient Gate).
Combine X-Shuttle gateless drive and Terran made gates and you have tools for building Terran gate network.
Now you have two species rapidly expanding beyond your control - good job Ancients! Good Job! Unless Terrans start galaxy wide Xenon hunt on their own (this would occupy both species with each other).
Still Ancients could reactivate gate in Sol Asteroid Belt leading to system more infected than Maelstorm, but I bet that Terrans with their own gate network probably already dismantle/deactivate/destroyed/fortify that gate already.