It's not uncommon for a tie-in book or comic to have some tenuous connection with a game, tailored to make sure it's additive but unnecessary to the plot. In the case of The Last of Us, on the other hand, the comic book actually influenced the ending of the game. Spoilers follow.
The Dark Horse mini-series establishes Ellie's friend Riley Abel, a name those who have finished the game might recognize.
"During the last speech Ellie gives during the game, she lists off all the people that have died on this journey, and the first name she lists is Riley," director and writer Neil Druckmann told Game Informer. "She was the first to die. They were both kind of bitten at the same time, but that little snippet in the comic influenced the development of the game, because originally we didn't have anyone with Ellie when she was bitten."
Druckmann also noted other minor additions that took notes from the comic. Ellie will describe a fighting game that Riley told her about if you find the arcade cabinet in the game. Plus, if you look into Ellie's backpack during the "Winter" season, it will explain how she obtained some of the items inside. "That was something that came up fairly late in development and we had to make some changes, but I felt like it really helped tie those two stories together," he said.
If you missed the comic series, it's being compiled in a book later this year.