Both my kids are autistic, and both are gifted.
My son was in a higher level GCSE group at 12 and so bored he had permission to play on his Switch as long as he could answer any question the teacher randomly lobbed at him, and get it right - which he could without fail. His cognition, even with the disabilities around visual memory etc, is overall 98th centile. He's been watching YouTubes on maths research for years. Especially fascinated by quadratic equations. He was put on the Able, Gifted & Talented register when he was EYFS.
My daughter hits the ceiling scores on most of her testing. She's consistently been tested at the 99.9th centile, unless you factor in a slower processing speed (81st centile) which drops it to 99.8. She turned up at school reading a well-thumbed copy of The Enchanted Wood - she was found in the reading tent at preschool one day. Nobody ever taught her how to read and nobody knows how she learned; we assume CBeebies and Numberblocks. By 8 she was reading Sophie's World and Animal Farm.
Unfortunately, both also have significant struggles in other areas. My son's weren't identified in time, so he has an EOTIS (LA fund education and therapies from home) due to trauma experienced in the school years, and my daughter also has an EHCP. She's academically off the charts, but at ten her emotional understanding is that of a preschooler. She has intense anxiety and needs a lot of reassurance and emotional support.
It's called having a spiky profile, and it's not uncommon in autism. Being able to hyper focus on one specific thing to a level of intensity that allows brilliance to happen is allied to real and significant delays elsewhere. My kids are very literal, hate not knowing what will happen and when, and my daughter especially is enormously vulnerable and naive.
And yes, they both love chess.
My husband and I met at Cambridge, and at this point, we are one of six families of contemporaries with gifted autistic kids. Interestingly, half of the families met their partner there, too, so that's 9 of us - and the other 3 parents are similarly academic. And those are just the people I'm still in touch with with autistic kids, 20 years on, so clearly there are likely to be many more. I think all of us have at least soft traits, and many are actively diagnosable if we ever bothered to be, including my husband and I. Obsessive hyperfocus on areas of intellectual interest are common in both autism, and academic high achievement. You don't need to be autistic to be academically inclined, obviously, but I think it can help. I also think the struggle with executive function inherent in autism is reflected in the trope of the impractical, absent-minded professor.
Your child may be gifted. Your child may be autistic. They may be both.
A diagnosis doesn't tell you anything much though. A really good ed psych does, alongside SLT and OT. Autistic kids are different to typically developing peers in terms of their needs, a lot of the time, and early assessment and allied adjustments can really help. This is especially so for sensory issues, which can be devastating if not properly supported and understood, and also in terms of their getting the right emotional support and reassurance if the social world is challenging.