McKellen, who played the wizard Gandalf in the "Lord of the Rings" film trilogy, said the festival was a platform for the community to make its voice heard in tightly-governed Singapore.
In a video message, McKellen said: "it's very important that gay people, wherever they are, should identify themselves, stick up for themselves, represent themselves, modestly and positively, so the rest of the world knows that we're here and we're not going to go away."
Known as Indignation, the festival is scheduled around Singapore's independence day on August 9 and will run from August 1-15.
Despite being one of Asia's most advanced societies, homosexuals acts are still outlawed in Singapore under laws dating back to British colonial days.
McKellen described the law barring homosexual acts as "dreadful" last month when he was part of the Royal Shakespeare Company's world tour to stage William Shakespeare's "King Lear" and Anton Chekhov's "The Seagull" here in Singapore.
The government said last year that oral and anal sex in private between consenting heterosexual adults would be legalised under Singapore's first major penal code amendments in 22 years.
However, the penal code's section which criminalises "gross indecency" between two males will remain, the government said.
Nevertheless, gay-friendly establishments like pubs and saunas are doing a roaring trade catering to both locals and foreigners.