The university of Sunderland has an Autism Research Unit that is studying this to a certain extent although it is more to do with is there a certain substance that can be detected in the urine as a result of gluten not being properly digested. They also test for casein. Not good at doing links but if you google it then you will find it.
We have started a GF diet for our son as a result of their testing but too early to know if there is an improvement yet. There are plenty of mums on here though who notice a difference.
Personal experience with GF / CF (diet usually combined with a casein free diet)
Not IMO coincidentally those in our family with ASD traits - diagnosis have a casein intolerance that was dx'd way before ASD (it does make me worry for ds4 as he ahs it, but we're very careful about him and his diet).
We've tried the GF diet on ds1 and his aggression reduced loads but it ahs to be said we've not amanged it for a while as he just refuses to eat. DS4 OTOH is on it as a preventative measure, won't get any until he is 2 or 3.
If i'm struggling I do find a GF diet helps de stress me as well, oats are aprticularly abd for me and I avoid those now.
Yes, we got ours tested by the university of sunderland (£60 each!!) and it came back gluten intolerant.
So we removed gluten from their diets, got gf stuff on prescription and never looked back!
Their behaviour has improved, they talk more, they are calmer, they are more interactive, they sleep better (although still not anything LIKE other kids!!). And we can tell if they accidently have anything with gluten because they turn into beasts!!!
I've read that it's very common - it's the effects of withdrawal. As such it's usually seen as a good sign - it means there was something to withdraw from, iyswim. Our nutritionist told us to expect possible 'irritability and increased agitation' from DS2, but that this would be temporary - we didn't get it and consequently didn't see any huge dramatic positive changes either (though we did get a calmer child who slept through the night, which was good enough!)