I just read a recent post on this which was great. And again I'm lucky, I found it:
What does the lag of CO2 behind temperature in ice cores tell us about global warming?
Certainly CO2 is not the only thing that affects global temperatures, but it's an important factor.
From your example on why temperature leads CO2 readings:
"The reason has to do with the fact that the warmings take about 5000 years to be complete. The lag is only 800 years. All that the lag shows is that CO2 did not cause the first 800 years of warming, out of the 5000 year trend. The other 4200 years of warming could in fact have been caused by CO2, as far as we can tell from this ice core data."
Let's analogize using newspaper as the atmosphere, fire as temperature, smoke as CO2 and ash as ice cores.
Why does smoke lead the fire as the first sign of burning in the five minutes it takes for newspaper to burn after ignition?
The reason has to do with the fact that the burning takes about 300 minutes to be complete. The lag is only 60 minutes. All that the lag shows is that smoke did not cause the first 60 minutes of burning, out of the 300 minute trend. The other 240 minutes of burning could in fact have been caused by smoke, as far as we can tell from this ash data.