I'm Autistic. (I don't like, "person with autism," because my autism is woven throughout my neurology and is inseparable from my personhood, as significant as my gender identity and more significant than my ethnicity.)
It's possible that my musical ability is a savant skill. I don't claim that it is, but I don't know that it isn't.
It might be genetic, because one of my great-grandfathers sat down and started playing the piano, apparently without ever being taught how; he also lead a cappella singing using a tuning fork, and taught singing using the Shape Note method. Another of my great-grandfathers put himself through college by playing the violin in a band, and composed original lullabies for each of his eight children every night when he put them to bed.
My piano teacher once told me that all the hundreds of students he had taught over several decades learned music exactly the same way, except for two, that learned a completely different way. I was one of those two. I asked him if he thought it was because I'm Autistic, and he said, "Not entirely." The other student that learned the way that I did also was on the Autism Spectrum, however, my piano teacher taught many other students on the Spectrum, and they learned music exactly the same way as all of his students with standard-issue neurology.
Of course, it's possible that the other student also started playing by ear as a young child, and maybe the difference is that we both used this ability as a crutch when learning to play the piano.
A very small percentage of Autistic people have a communication problem that can be circumvented by singing. When I was a toddler, I could repeat anything, and even recited entire children's books, but if I wanted to actually use language to communicate (rather than just repeating things I'd heard), I could only do that by singing.
Singing uses a different neural pathway than speaking does. I can still remember the melodies for some of my important early childhood songs, especially, I've Got To Go The Bathroom! Over time, I was able to use singing to build an alternate neural pathway to speech.
This is why I say that music is my first language. Without singing, I may have never been able to really communicate with speech, and it still comes much more naturally to me to communicate my emotions through music, than through words alone.