The Eton-educated actor told the event people who had complained were "missing the point" as the evening was "a celebration of our community... and the role the school has played here".
Alumni from Acland Burghley School in north London had signed a petition against the Homeland star's appearance.
The actor lives near the Camden school.
More on this story and other news from London
The petition said: "Damian Lewis was educated at Eton, a school that, more than any other, represents the reproduction of privilege and inequality in the UK."
Lewis told the audience of about 450 "there is more creativity, independence and support in this neighbourhood than any other... I have lived in."
He praised the school for teaching such "qualities", calling it "a beacon of curiosity, independence, creativity and diversity".
The woman who began the petition, which garnered 100 signatures, said she had not meant it as a personal attack against Lewis.
"It's really just about how do you celebrate the anniversary of a really good comprehensive school that has always taken a very radical and socially progressive attitude towards education," Rachel Cohen said.
On the petition the City University sociology lecturer had written that the Wolf Hall actor was "a wholly inappropriate choice" for a celebration at a comprehensive school.
Many of those who were there cheered his appearance, calling Lewis an "inspiration".
Headteacher Nicholas John said it was "great" he was an actor who wanted to be "involved in the community".
The event featured a laser show which Lewis began the countdown for.
Other alumnus from the school include singer Ms Dynamite and Madness saxophonist Lee Thompson.
Damian Lewis profile

Media playback is not supported on this device
Louloudis, 23, missed the event in 2012 as he competed for Great Britain at the London Olympics, winning a bronze medal in the men's eight competition.
Cambridge will again have the heavier crew, at 5.25 kilograms per man more.
And for the first time in its 90-year history, the women crews compete on the same day and course as the men.
Racing along the River Thames from Putney to Mortlake, Cambridge will have the heavier team in the women's Boat Race, 0.9 kg per rower more than Oxford.
Oxford are the reigning men's champions after powering to their fifth triumph in seven years in 2014.
Damian Lewis has hit back at critics who claimed he was too privileged to take part in his local comprehensive school's 50th anniversary celebrations.
[NEXT_CONCEPT]
Constantine Louloudis will go for a fourth Boat Race win in five years for Oxford when they face rivals Cambridge in April live on BBC TV.