Avant-garde stand-up comic Lee - who Gervais has previously cited as an influence on his comedy - told Rob Brydon on his podcast Rob Brydon & that while he had been a fan of sitcom The Office he believed Gervais' more recent work was "abysmal".
Lee, 54, said: "I think The Office is brilliant. I think Ricky’s comedy drama work is of diminishing returns to the point where it’s now abysmal.
"I think it must be very sad if you’re teaching drama or creative writing - how can you make a case for the things that make drama and creative writing good when After Life is a success? Because your kids could just go, ‘But none of those things happen in this!’ And yet, millions of people watch it.
“I think it’s one of the worst things that’s ever been made by a human."
Gavin and Stacey star Brydon pointed out: "I read you were a big influence on him, he's said as much."
Lee responded: "I don’t suppose Robert Oppenheimer felt great about having created the atomic bomb.”
Brydon asked Lee how he would feel if he bumped into Gervais having said that, to which he replied: "I don't move in the same circles."
Gervais, 60, has appeared to respond to Lee's critique on social media by posting a string of tweets about how successful After Life is.
He reposted a publicity tweet from Netflix that claimed After Life is the most watched British comedy in the world with a global audience of over 110 million, and captioned it: "Best fans in the world."
Gervais - who writes, directs and stars in the series about widower Tony, who decides to punish the world after his wife dies of cancer by doing and saying whatever he wants - also shared clips from the show captioned: "The best trailer ever made."
He also tweeted: “Watch the award-winning, record-breaking #AfterLife Now streaming on Netflix around the world.”
And he liked a string of tweets from fans praising his comedy drama.
Gervais also shared a picture of himself laughing with his dogs, captioned: "Hope you're having the day you deserve."
Hope you're having the day you deserve. pic.twitter.com/Rrx3OlR5s2
— Ricky Gervais (@rickygervais) September 12, 2022
Lee is not on social media.
The stand-up comic won a TV Bafta in 2012 for best comedy programme for Stewart Lee's Comedy Vehicle. It was cancelled in 2016 after four series.
Watch: Ricky Gervais discusses joking about taboo subjects