Etymologically, gringo comes from griego ("Greek"), since Greek was the proverbial example of not understandable language (as in Shakespeare's "That's Greek to me"). It was then applied to speakers of foreign languages, especially English language. Later it was extended to white-skinned people even if Spanish-speaking, and can sometimes even mean just blonde.
Most English language speakers have met the word in Western films.
Compare with Yankee.