No age threshold but probably a commonsense one, from all sides...
The majority of primary schools won't have the facilities or available adults to facilitate separate gender changing and for the majority of children it won't be an issue. I teach children how to get changed at their chairs without stripping off - if everyone's legs are under the table and bottoms are on chairs then there is very little dawdling or silliness and body parts are revealed to nothing other than the chair/underside of the table. T-shirts can be changed with minimal exposure too.
This year I have an enormous classroom so the boys change at one end and the girls at the other. It works well for them and avoids the risk of clothes/PE kits/shoes etc. ending up on the wee-soaked floor of the toilets.
I find children are quite sensible about changing for PE and those who are uncomfortable about it will usually ask in a roundabout way if they can do something different. If it's a child whose size/stage of development is an issue or a child who has scars/eczema etc. etc. I usually suggest they come in 5 minutes before the bell goes so they can change in the classroom whilst I go to collect the rest of the class - if it matters to them they happily opt for that.
IME parents seem to have far more of an issue with the concept of mixed gender changing than the children which is a shame. If children are uncomfortable with it then it's something to bring up in class/school council. Yes, privacy is important but so is a sense of proportion and I do worry about the messages that are being given to some of the children, girls in particular, by the parents I've had speak to me about it.