I have checked on the Net, and have found out that this is a discriminatory term. ガイジ comes originally from ショウガイジ (handicapped persons). It now has an extended meaning, persons who have an absurd behavior or speech. Often used on SNS like Twitter by a certain group of people. You better not use it.