idiot savant
Concise Oxford English Dictionary © 2008 Oxford University Press:
idiot savant /ˌiːdjəʊ saˈvɒ̃, ˌɪdɪəʊ/
▶noun (pl. idiot savants or idiots savants pronunc. same) a person who has a mental disability or learning difficulties but is gifted in a specific way, such as the ability to perform feats of memory.
– origin Fr., lit. ‘knowledgeable idiot’.
'idiot savant' also found in these Oxford entries:

