Savant syndrome is a phenomenon where someone demonstrates exceptional aptitude in one domain, such as art or mathematics, despite significant social or intellectual impairment.
Those with the condition generally have a neurodevelopmental disorder...
Wikipedia