The word is formed after the name of John Duns Scotus, 13c theologian. His views fell into great disfavour in England during the Reformation, esp. his defence of the papacy. The epithet 'Dunsman', first used by William Tyndale (d. 1536), became in time 'dunce', a word of abuse, suggesting ignorance and stupidity. The word's vector from scholar to ignoramus is intriguing.
Dictionary of Medieval Terms and Phrases. Christopher Coredon with Ann Williams.