In past times, roads were sometimes called 'turnpikes'...they still often are in the USA. Consequently, a 'turnpiker' was someone who roamed along these roads, as a sort of traveller/vagabond. That in turn was abbreviated to 'pikey' or 'piky', which has meant a gipsy - as the earlier answer says - since the mid-1800s.
Just want to add that these days pikey is generally used to define someone who is classed as an undesirable, a rogue; dodgy, 'skanky', shifty, not particularly law-abiding...
What it has come to mean now is an insulting term for the shellsuit/ cheap jewellery/ badly-dyed hair/ fake Burberry-wearing, slightly malnourished-looking, skanky types that you'll see next time you step out on to the high street. Or that's how it's been explained to me.
Round my way, 'pikey' is just another word for 'common'. Except if you call someone common, you're termed a snob, if you call someone pikey, people think it's hilarious.
Made famous by "Snatch" but a common term (in my case, for an Irish gypsy - same as in the film). For god sake never call an Irish gypsy a pikey if you want to see another dawn.....