Viral Mutation
This apparent discrepancy was explained in Star Trek Enterprise. Long story short, Klingons experimented with genetic mutation to make themselves stronger, much like what was accomplished with Kahn and the Augments, but there were side effects that made the Klingons look "hoo-mahn". These side effects were spread by a resulting virus, and after a cure was developed the human traits ware still passed on genetically by some.
From Memory Alpha:
In 2154, Klingon scientists working under the direction of Antaak
recovered several Augment embryos from a hijacked Bird-of-Prey
destroyed in orbit of Qu'Vat colony during the Augment Crisis. Fearing
that Humans could overwhelm the Empire if they moved to staffing their
ships with Augments, a project was set up to attempt to create their
own Augments to counter the perceived threat.
The effort failed dreadfully. The Augments created did develop
enhanced strength and intelligence, but they also began to show Human
characteristics, from the blatant to the subtle. These included
personality alterations and loss of the characteristic forehead
ridges. Ultimately, the subjects died agonizing deaths when the
incompatible DNA resulted in neural system breakdown. While working to
stabilize the augmentation process, the scientific team enhanced a
test subject who was, unknown to the team, also infected with Levodian
flu. The flu virus in some manner incorporated the Augment DNA,
turning a carefully controlled experiment into an epidemic. As the
unstable augmentation process always killed the subject, this epidemic
threatened the Klingon race with extinction.
The virus spread very rapidly, infecting millions within months. One
of the first planets struck was N'Vak Colony. The Klingons attempted
to capture Doctor Arik Soong to help develop a cure, but their efforts
were thwarted by Soong's incarceration in a high security detention
facility. They then moved to kidnap Doctor Phlox, using Rigelian
intermediaries and the assistance of Section 31 agents. Phlox was
forced to work with Antaak to find a cure. However, the Klingon High
Council was unwilling to wait, and dispatched a fleet to annihilate
the infected planets, starting with N'Vak Colony. Afterward it set
course to Qu'Vat colony. (ENT: "Affliction")
When it became
clear to the research team on Qu'vat colony that it would take weeks
to develop a cure, stabilizing the augment virus became the
researcher's primary concern. Their efforts proved successful; a
method was developed that stabilized the process in the early stages,
after the cranial ridges had dissolved and some minor neural
re-ordering had occurred (which caused personality changes), but
before the virus became contagious, enhanced augment abilities, and
caused a fatal neural pathway breakdown.
Eventually, Admiral Krell convinced the High Council to call off their
sterilization program of destroying the infected planets. The cure was
distributed throughout the Empire. Because afflicted Klingons' DNA had
been altered by the virus, the Human appearance and genetic traits
were passed onto the descendants of the infected. Initially there were
millions of Klingons who had to live with the disfigurement. (ENT:
"Divergence")
In 2154, Antaak and Laneth
feared that Klingons without ridges would become outcasts, lose their
positions and would no longer have a place in the Empire. (ENT:
"Divergence") However, by the 2260s, affected Klingons served as the
captains and crews of front-line starships in the Klingon Defense
Force. (Star Trek: The Original Series) Later on, some of them even
achieved the title of Dahar Master and earned their statues among the
Hall of Heroes on Qo'noS. (DS9: "Blood Oath", "The Sword of Kahless")
By the 24th century, knowledge of Klingons with smooth foreheads had
been generally forgotten by the population of the United Federation of
Planets. Also, the reason for Klingons having smooth foreheads a
hundred years earlier was not widely known outside the Empire. When
asked by Miles O'Brien and Julian Bashir, Worf simply gave the answer
"we don't discuss it with outsiders", though Bashir immediately
suspected viral mutation to be the cause. (DS9: "Trials and
Tribble-ations")