Fantasy fans group their sub-categories of fantasies by setting and dark fantasy is one of the atmospheric setting sub-fields (such as humorous fantasy). As such, it can cross over to multiple, more concrete settings/sub-fields and works called dark fantasy are often the subject of much debate as to whether folk think they "fit" in the sub-field or not. To complicate things further, dark fantasy is the cousin or twin sibling of horror, is regularly cross-marketed with horror and the line between horror and dark fantasy is obviously misty, with dark fantasy often being seen as a sub-set of horror or many types of horror stories being seen as a sub-set of dark fantasy.
Dark fantasy initially was often called Gothic fiction, a sub-set of horror fiction that indicated works in what eventually was called the Weird Fiction literary movement of the early 20th century. Gothic works by 19th century writers like Poe and then their descendants, the Weird Fiction writers of early magazines such as H.P. Lovecraft, Clark Ashton Smith, etc., were seen as dark, phantasmagorical stories, moodier and spookier and distinct from other types of horror. They were also seen definitively as fantasy stories, with supernatural/fantastic elements, whereas horror could also be science fiction or mimetic stories as well as fantasy ones. The other key aspect was the atmosphere -- tragic elements and endings for many main characters, spooky and disturbing situations, a feeling of dread and strange, dark secrets as the general tone/style of the stories.
In the later part of the 20th century, mainly starting in the 1960's, a number of SFFH writers and others referred more regularly to some fantasy works as "dark fantasy," including the Kane books. The idea of moral ambiguity and anti-heroes, descended from Weird Fiction and other traditions, was seen as part of the aesthetic setting of dark deeds, spooky places and tragic events. As modern sub-categories developed in bookselling, dark fantasy tended to be used for fantasy stories published by category SFF imprints or magazines and not specifically marketed as horror; horror novels for instance usually being published in general fiction imprints or specific horror magazines rather than SFF imprints and magazines. Dark fantasy novels would get cross-marketed and publicized to horror audiences but would be more likely to be found shelved in the SFF section of bookstores.
The development of more and more fantasy novels where "monsters" like werewolves and vampires were treated not as monsters to simply be defeated but more complex and often main characters, from the late 1970's onward, led to those stories usually being seen as spooky dark fantasy rather than horror, though again the cross-marketing between the two areas of speculative fiction made distinctions murky. As a sub-category in the field, dark fantasy had a growth expansion in the late 1970's and in the 1980's (when all types of fantasy grew considerably.) When a horror section as part of the horror category market was launched in bookstores in the oughts, many "dark fantasy" novels were sold in that section as well as in the SFF section, especially if the story also took place in a contemporary Earth/alt Earth setting (contemporary/urban fantasy.)
In the late oughts to 2010's, a literary movement emerged in fantasy that descended from Weird Fiction/Conan-ish stories of the century before. These stories were essentially dark fantasy tales set in pre-industrial secondary world/epic fantasy settings with similar elements and tonal approaches to Weird Fiction stories, along with more modern nihilistic and visceral horror traditions. This movement's mix of elements and tones was eventually tagged with the name grimdark fantasy, a subset of dark fantasy and a subset of sec world/epic fantasy.
In the 1970's and 1980's, some of Tanith Lee's fantasy stories led to her being called the queen of dark fantasy in the field. Anne Rice's works were marketed as horror in the general fiction area of the bookstore but were also seen as major dark fantasy stories that followed Gothic, Weird Fiction and modern dark fantasy trends and led the monsters as main characters style of stories in the field. Michael Moorcock's Elric stories, and some of his other works from the later part of the 20th century, are seen as a major example of dark fantasy and a historical link of descent between the Weird Fiction and grimdark literary movements. They typify the dark fantasy idea/atmosphere of a tragic, morally ambiguous protagonist in a dangerous setting, often a full-out anti-hero. Other works around that time like Zelazny's The Chronicles of Amber, Stephen King's Dark Tower stories, Glen Cook's The Dread Empire series, etc. were similar major publications in dark fantasy. Ray Bradbury's Something Wicked This Way Comes tends to be seen both as a remarkable work of horror and of dark fantasy to SFFH fans. Likewise, Stephen King and Peter Straub's 1984 novel The Talisman and Clive Barker's 1991 novel Imajica are described by fans both as horror and dark fantasy.
On the sec world/epic side of the fence, works in the 1980's and 1990's like Glen Cook's The Black Company and George R.R. Martin's A Song of Ice and Fire were popular dark fantasy and major influences on the later grimdark literary movement, followed a bit later by things like Steven Erikson and Ian C. Esslemont's Malazan novels and Anne Bishop's The Black Jewels trilogy. In addition to the grimdark type titles, there are also dark fantasy sec word books like N.K. Jemisin's lauded Broken Earth trilogy. The Witcher is indeed considered a major dark fantasy series in the sec world area.
On the contemporary fantasy side, there are titles like Neil Gaiman's American Gods, , as well as older titles like Graham Joyce's The Tooth Fairy. YA has a long tradition of dark fantasy from Susan Cooper's The Dark is Rising series to Philip Pullman's His Dark Materials to Leigh Bardugo's Shadow and Bone series. In historical/alt historical fantasy, there have been many dark fantasy titles like Jonathan Strange & Mr. Norrell by Susanna Clarke, Mary Gentle's Ash: A Secret History and The Keep by F. Paul Wilson.
Dark fantasy is currently in another growth expansion in the SFFH fields. Titles like Gideon the Ninth by Tamsyn Muir, a futuristic dark fantasy, Babel by R.F. Kuang, a historical fantasy novel, and Adrian Tchaikovsky's Echoes of the Fall series, a pre-industrial sec world fantasy, have done well in recent years and more dark fantasy titles are due out on all fronts. On the graphic novel side, dark fantasy also has a long tradition with older titles like Neil Gaiman's legendary Sandman series to the more recent Marjorie Liu's Monstress series.
While it remains a diffuse and hazy designation, dark fantasy is seen as fantasy stories meant to disturb, unsettle, dealing with tragic, gloomy, destructive/severe, spooky/mysterious elements through its atmosphere/setting rather than an outright horror brief of terrifying and shocking the readers. But a lot of stories do get called both.