His beloved friend, author and organizer Cleve Jones, shared the sad news on Twitter.
Baker was born in Kansas in 1951, and served in the army from 1970 until 1972.
San Francisco was then a center for the women's-rights and civil-rights movements, and after a police raid in 1969 at the Stonewall Inn in Manhattan, a gathering spot for gay New Yorkers, more people began coming out as gay. He created banners for gay-rights and anti-war protest marches and it was during this time that he met and became friends with Harvey Milk.
It was after the election of Harvey Milk, the first openly gay person to be elected to public office in California, when Gilbert created the rainbow flag.
He created the rainbow flag in 1978. Milk was assassinated later that year.
The first flag had eight colours that represented different facets of humanity.
Pink represented sexuality, red symbolised life, orange symbolised healing, yellow signified sunlight, green represented nature, turquoise symbolised art, indigo represented harmony and violent was the human spirit. San Francisco Mayor Ed Lee issued a statement Friday saying that in memory of Baker's contributions to the LGBT community, the rainbow flag will fly at half-staff from his balcony. "Oh my God, you don't even want to know", he said. That really fit us as a people because we are all of the colors. "We are all the genders, races and ages", Baker told Steve Grzanich of WBBM Newsradio in Chicago in 2012. Jones had planned the vigil under the flag at 7pm local time (02:00 GMT).
For Stonewall 25 in 1993, Baker and his team sewed this almost mile long flag that stretched up 1st Avenue from 23rd Street to the United Nations at 44th Street.
New York's Museum of Modern Art in 2015 acquired the flag for its design collection, calling it a "powerful design milestone".
"A flag translates into everything, from tacky souvenirs to the names of organizations and the way that flags function", Baker said in 2008. He also donated one of the 100 hand-dyed reproductions of the flag he made several years ago, the non-profit organization said.
He later moved to NY in 1994 and created a mile-long rainbow flag for the gay pride parade, which that year commemorated the 25th anniversary of the 1969 Stonewall uprising.
The GLBT Historical Society asked that rainbow flags worldwide be lowered to half staff in honor of Baker.