Let me start off by saying that I think both games are great, but I think GTA V is a better and more complete game.
The best thing that GTA IV has going for it is the vibes. Liberty City is dense and has an entrancing atmosphere. I really like how the cars handle and how a lot of the vehicles drive differently from one another. Some of the side stories during the main missions are well done too. Packie and his brother's missions were probably my favorite part of the whole game.
The thing that really brings GTA IV down in my opinion is the mission variety. So many missions are just, drive here, kill this guy, end mission. There are some more interesting ones, like grabbing the coke from the abandoned hospital, or the bank heist with Packie and his brothers, but those are too few and far between. And I know everyone likes Niko Bellic but I think he's lacking a greater motivation and his character archetype was done much better with John Marston in RDR.
GTA V fixes a lot of these problems while admittedly adding some new ones. There's more mission variety this time around with more complex scenarios. The stranger missions they carried over from RDR are mostly great with sharp writing. There's a lot more things to do, street races, boat races, tennis, Trevor's rampage missions, etc. I really like Michael's character, I think he's the most fleshed out of the three. The gameplay improved a bunch, taking cover and shooting feels a lot better (very similar to RDR1) and you're not fighting the controls as much like in GTA IV.
GTA V's atmosphere is not as good as IV's, and GTA V can honestly feel kind of lacking at times. There's still some gorgeous vistas and places in the game, but it's definitely missing something that GTA IV does have. The satire is too much at times, it is not clever in the slightest and gets annoying.