The way it works is when shooting at a target, an auto-firing weapon will initially lag behind, but - with more time spent firing at the same target - it will gradually catch up.
A better "target leading accuracy" both reduces the amount of initial "lag" and the time it takes to catch up.
Note that CR also factors in - at 100% CR, the initial aim is at the best possible quality, and likewise if the ship's captain has Gunnery Implants. So, having both is overkill, but GI helps once CR gets below 100%. Integrated Point Defense AI also makes PD weapons have the best possible aim under all circumstances.
For AI captains, the "target leading accuracy" also affects their aim as far as pointing the ship itself at a target, with a separate value tracking how long they've been aiming at the same target, and with the aim gradually improving (if possible, i.e. if it didn't already start out the best possible due to GI etc).
If you're curious, the way "lagging behind" works is by underestimating how long it'll take for shots to reach the target, and by gradually improving this estimate. As a consequence, beam weapons are not affected by aim quality, being essentially hitscan. The worst possible aim quality, iirc, assumes shots are twice as fast as they actually are.
(Edit: oops, partially ninja'ed...)