Gauss turrets are indeed best used in final defense fire mode.
draanyk´s assumtion is correct. In that mode, they fire at any missile attacking the task group once the enemy missiles reach a distance of 10.000km, so 40k range is quite enough.
40k tracking speed is quite a bit. Remember that this will do you no good, unless your targeting system can track at that speed too, however, as only the lower of both applies.
On CIWS:
Personally, I don´t use them on my combat ships (explorers, colliers, troop transports,... yes, but not combat ships).
As they only protect the ship they are on and I am a big believer in the "No ship will ever operate on its own" doctine, it is more efficient to put PD-turrets on them, to create a PD network.