Scott Safier has a constructed a page explaining the Rainbow Flag.
The Alyson Almanac: A Treasury of Information for the Gay and Lesbian Community describes the Rainbow Flag as follows:
In 1978, Gilbert Baker of San Francisco designed and made a flag with six stripes representing the six colors of the rainbow as a symbol of gay and lesbian community pride. Slowly the flag took hold, offering a colorful and optimistic alternative to the more common pink triangle symbol. Today it is recognized by the International Congress of Flag Makers, and is flown in lesbian and gay pride marches worldwide. In 1989, the rainbow flag received nationwide attention after John Stout successfully sued his landlords in West Hollywood, when they prohibited him from displaying the flag from his apartment balcony. Meanwhile, Baker is still in San Francisco, and still making more flags.