The English Heritage plaque was installed on the block in Farley Court on Marylebone Road, where the comic lived for seven years in the 1960s.
Unveiling the plaque, his Carry On co-star Barbara Windsor said: "Kenny was a one-off, a true original."
In his diary the actor had said how "elated" he was to move into the flat.
Williams lived in Flat 62 between 1963 and 1970 when hits like Carry On Cleo, Carry On Up The Khyber and Carry On Camping were filmed and he made regular appearances in the hit radio comedy series Round The Horne.
The comic wrote in his diary about the excitement of moving into the flat, noting: "My bedroom looks out over Regent's Park. The trees are turning now and the sight is beautiful.
"I can see all the traffic twinkling down the Marylebone Rd - It's all so marvellous, I could cry."
Windsor said she was "absolutely chuffed that English Heritage is celebrating him with a blue plaque".
English Heritage's blue plaque historian Howard Spencer said: "Kenneth Williams was a unique comic talent, who as both an actor and a storyteller won the nation's affections.
"That legacy is now recognised by one of our blue plaques in London, the city in which he lived all his life."
Williams died from a barbiturate overdose in 1988.
Comic and Carry On star Kenneth Williams has been honoured with a blue plaque in central London on what would have been his 88th birthday.