During his sell-out 2009 stand-up show Science, Gervais branded the Britain's Got Talent sensation a "mong", a word that has been historically used as a derogatory term for Down's syndrome sufferers.
However, despite a high number of complaints from viewers when the set was televised last October, Ofcom decided to defend Gervais and Channel 4.
> Ricky Gervais on 'mong' storm: 'I was naive'
The broadcasting regulator's ruling stated: "This involved Ricky Gervais evoking the word's offensiveness to some extent, and challenging the relationship between the offence and the word itself.
"We considered, therefore, that the nature and focus of the routine provided a clear editorial context for his use of the term."
Ofcom added: "We also took into account that Channel 4 brought the challenging nature of the content to the attention of viewers with a warning at the start of the programme, which stated that it would contain 'strong language and adult humour'.
"We therefore concluded that several aspects of this content had the potential to cause considerable offence. However, on balance, this potential offence was justified by the context of this provocative comedy routine challenging the evolution of words, as broadcast with a warning as part of a late night comedy show on Channel 4."
> Richard Herring on Ricky Gervais: Comics should consider consequences
> Ricky Gervais blasted by Herring, other fellow stand-ups for calling people 'mongs'
Criticising the decision, Penny Green, director of Down's syndrome charity Down's Heart Group, told the Daily Mail: "It's very sad that in effect Ofcom is excusing Ricky Gervais because of the time the show was broadcast and a very loose warning about content, and yet they issued a warning to TV bosses about the use of the word, saying 'their research showed it had the potential to be highly offensive' and 'great care' should be taken over its use.
"It's almost like giving carte blanche to anyone to use offensive language directed at a particular group just as long as they do it at 'an appropriate time'."
She added: "Why can't we just accept people for who they are? And if we really can't cope with their differences (usually from fear of the unknown or outdated and unrealistic stories I might add), can't we just avoid them without feeling the need to publicly poke fun at and humiliate them."