Lewis issued a statement, saying: "I am hugely embarrassed that comments of mine have been linked in a negative way to Sir Ian McKellen. I have always been, and continue to be, an enormous fan and admirer of Sir Ian's.
"He's one of the greats and one of the reasons I became an actor. My comment in the Guardian was a soundbite I've been giving since 1999 - it was a generic analogy that was never intended to demean or describe anyone else's career. I have contacted Sir Ian McKellen and have given him my sincerest apologies."
While not naming names, Lewis, who shot to fame as Brody in US show Homeland, said that in his 20s he worried that if he did not get out of the theatre in time, "I would be one of these slightly over-the-top, fruity actors who would have an illustrious career on stage, but wouldn't start getting any kind of film work until I was 50 and then start playing wizards".
The X-Men star, whose screen success came relatively late, said the remark was "a fair comment".
But he added: "To rebut it: I wouldn't like to have been one of those actors who hit stardom quite early on and expected it to continue and was stuck doing scripts that I didn't particularly like just to keep the income up.
"I've always wanted to get better as an actor. And I have got better. You've only got to see my early work to see that.
"As for a fruity voice? Well, it may be a voice that is trained like an opera singer's voice: to fill a large space. It is unnatural. Actors have to be heard and their voice may therefore develop a sonorous quality that they can't quite get rid of, so you think actors are as pompous as their voice is large. I suppose Damian was thinking of that a little bit, too."
He told the magazine: "To be allowed for the first time in your later career to play leading parts in extremely popular movies is not a situation to worry about. No one needs to feel sorry for me or Michael Gambon (who played Professor Dumbledore in the Harry Potter movies) or anyone else who has fallen victim to success."