Books have inspired all kinds of different media, video games included. It's pretty rare for games to be directly taken from books, which means there are a lot of video games you didn't know were books first. Games tend to adapt features, atmospheres, and ideologies from books, which makes for intriguing stories and hidden Easter eggs for the most observant of players.
Games writing is its own unique animal, which is part of the reason that video games inspired by books tend to crib ideas or atmospheres from books rather than be outright, moment-by-moment adaptations. Both kinds of video games based on books exist, of course, but the realities of writing for games mean it isn't as easy as writing a story and having the developers, designers, artists, and so on make it a reality. But that's what makes games based on books special: they're enjoyable not just because they replicate our favorite stories, but because they do so by translating them to an entirely new form and method of experience.
BOOK IT'S BASED ON: Atlas Shrugged by Ayn Rand (1957)
Ayn Rand's system of objectivism is everywhere in BioShock. In both Atlas Shrugged and 2K's hugely influential shooter, a society of brilliant minds secludes itself away from the ungrateful world. However, while the former champions this individualism and isolationist capitalism, the later strongly critiques it. As players explore the underwater city of Rapture, they find a world ravaged by self-indulgent experimentation and rampant individualism to the detriment of society. BioShock is an exploration of the extension of Rand's vision--not increased production, not incredible innovation, but rather a society so focused on the individual that it devours itself alive.
Also Rankedsee more on BioShock
BOOK IT'S BASED ON: Parasite Eve by Hideaki Sena (1995)
Hideaki Sena's Parasite Eve is an interesting case--the game isn't an adaptation, because it's actually the canonical sequel to the novel. The novel is a sort of biological horror story where mitochondria have developed consciousness and intelligence that surpasses humanity's. In the game, the player takes on the role of Aya Brea, a New York City police officer trapped in the middle of the mitochondria's plot for domination. Combining the horror of the novel with survival-horror mechanics, Parasite Eve takes a step further than the novel, imagining a future where mitochondria have already begun to destroy human bodies in revenge. It's a fitting sequel that applies what works so well about the novel to video games, turning the horror into an even more frightening experience when players feel it first-hand.
Also Rankedsee more on Parasite Eve
BOOK IT'S BASED ON: The Witcher series by Andrzej Sapkowski (1994)
The Witcher is one of the more direct book-to-game adaptations, but even it is quite different than its literary inspiration. Both follow the adventures of Geralt of Rivera, a monster hunter (called a witcher) in a fantastic setting based on Polish myth. But rather than The Witcher books drawing people to the games, it's largely worked in reverse. Though Sapkowski is a cult favorite in Poland, the books weren't translated into English until 2007, the same year as the release of the first game. Since The Witcher 3 garnered so much attention for its commitment to fantastic open-world storytelling, it's no surprise that players have turned to the books for more of the same.
#15 on The Best Games Like Skyrimsee more on The Witcher
S.T.A.L.K.E.R.: Shadow of Chernobyl
BOOK IT'S BASED ON: Roadside Picnic by Arkady and Boris Strugatsky (1971)
The Strugatsky brothers' Roadside Picnic takes place after an extraterrestrial event that spans several locations throughout the world. These events, which weren't seen, have left the sites full of dangerous phenomena and objects with supernatural properties. S.T.A.L.K.E.R. isn't a direct adaptation, instead taking that premise and applying it to the Chernobyl accident site and swapping the extraterrestrials for government experiments. The game references plot points and characters from the book, making it a sort of reimagining of the well-regarded novel rather than a direct adaptation, but with a compelling throughline between the two nonetheless.