Grimdark is a subgenre of fiction (usually scifi and fantasy) where everything is bad. Specifically, it is fiction where the tone, themes, style, subject, or setting are dystopian, violent, bleak, disturbing, amoral, or otherwise severely unpleasant.
The word originated from the tagline of Warhammer 40k, "In the grim darkness of the far future there is only war," but the genre itself sprung up out of low fantasy or sword and sorcery style fantasy, namely from selfish and/or morally gray protagonists thrown into adventure, as opposed to heroic protagonists fighting for a greater good. Over time, the gray morality got darker, the villains became more complex (or, alternatively, less complex and even more evil).
It should be noted that other, closely-related genres have sprung up around grimdark fantasy, such as gritty fantasy and dark fantasy (which specifically adds horror elements). Interestingly, as time has passed and the genre has expanded, works that originally were acknowledged as part of the genre have since come to be the subject of debate as to whether or not they are actually dark enough to qualify, or if they're just regular high fantasy or low fantasy or one of the other newer subgenres.
For example, A Song of Ice and Fire by George R. R. Martin was considered to be grimdark for a long time, however now some argue that it is actually just epic fantasy with a cynical and realistic bent.
In any case, some widely accepted examples of grimdark include: