AHD indicates "gringo" was an earlier Spanish word, originally meaning "Greek" but then extended to mean any foreigner, much in the sense of "It's all Greek to me", or "one foreigner is the same as any other." (That proverb is clearly older.)

See http://www.snopes2.com/language/stories/gringo.htm for the same view -- but suggesting that the Spanish-American War, 1846-1848, may have brought this word from Spanish into English.

Edit: Apparently there has been some controversey over the "green grow" and "greek" theories. Various sources are summarized, with links, at:
http://ask.yahoo.com/ask/20000821.html