Yes, “gypsy” is a racial slur.
Basically, ignorant people labeled another group of people (the Roma) “gypsies” because they thought they looked like Egyptians, and therefore must have been Egyptians. These same people treated them like crap. Today, the word “gypsy” is loaded with negative stereotypes - in fact, the word “gip” or “gyp” (which means “to con” or “to cheat”) comes from the word “gypsy.”
And that’s what makes a slur.