From egiptano (“Egyptian”), from Ancient Greek Αἴγυπτος (Aíguptos). It was originally mistakenly believed that the Roma/gypsy people originated from Egypt. See also the related etymology of English Gypsy.
Practice speaking and memorizing "gitano" and many other words and sentences in Spanish.