From hazy high school memories:

Gaijin translates literally as "white man", but tends to be applied to anyone who is not Japanese parented, born and bred. It also carries with it the connotation of "outsider". While it is not always negative, and is often used in a friendly way similar to gringo, the Gaijin are (or at least were) often considered to be a lower class of citizen. It is highly unlikely that a Gaijin would reach upper management in a Japanese company, a high level in politics, or significant social standing outside the entertainment (including sports) industry. Being a Gaijin has been compared with being an African-American in the States.