I think both of them are great in their own right. However, IV remains my personal favorite.
While I liked V's story, because of how un-GTA-ish it was (no clear primary antagonist, no revenge plot), it had its share of faults. Both Trevor and Franklin feel sort of...there, but not really important. As if this isn't really their game. Franklin has a strong opening, but once Michael appears, he pretty much plays no important part in the story until the end. Michael's and Trevor's relationship is wonderfully build and played with (
are among my favorite scenes in the entire GTA series), but Trevor himself is seriously underdeveloped. He had an enourmous potential and there are definitely seeds of something interesting here and there in the story, but I never felt I understood him. I understood all IV era protagonists, I understood Michael and Franklin, but Trevor is sort of mystery to me. Maybe I missed something, but R* has never shown me what really made Trevor tick, why I should care about him. I mean, you can make the audience care about psychopathic characters - not symphatize with them - but understand them. Trevor just didn't felt properly fleshed out.
On the other hand, Michael is my favorite protagonist in any GTA game to date. Even though he doesn't have as many redeeming qualities as CJ, Niko or Johnny, he was a complex and interesting character to follow. He was a bastard, but I really rooted for him. It was truly heartwarming for me,
As for the rest of the cast, I'd say IV's was better. V's characters are maybe more entertaining (Jimmy, Lamar), but also, as a result, feel less believable. In IV, even comic reliefs, such as Brucie or Bernie had some depth to them. I didn't feel that way with Jimmy, Wade or other characters.
If V was just a Michael's story, it would have been excellent. But it was also Trevor's and Franklin's story. And those two were just underdeveloped and sort of brought it down. I love the multiple protagonist concept and I want R* to continue with it, but next time, they need to give all their stories proper focus. Maybe just two protags instead of three will help?
Even though I did nothing but complained about V's story in previous text, I think IV's story isn't that much better. It has its problems too, some of which V avoided. For example, V's plot didn't feel as forcefully stretched out (Bohan and early Algonquin chapter in IV are prime offenders) and it made me feel like every mission really moved the plot forward.
Gameplay-wise, I have to admit, V wins. You can't really beat all those toys to play with in freeroam and sweet MP3 shooting. However, IV still has better driving and I think its side-missions were better. Vigilante missions, Import-Export, Fixer's assassinations, Little Jacob's deliveries, etc. There were less of them, but they were better structured.
As for setting, IV easily beats V, in my opinion. V's map is big, colorful and varied, but I just don't like Los Santos. I love Liberty City, with its atmosphere and boroughs. It's in ingame presentation of the city too. The way Los Santos is presented in the game, as a sh*thole of celebrity, status and fame-obsessed d*ckwads, I don't know, it just kinda rubbed me in a wrong way. Liberty City was a "worst place in the America" too, after all, but it just had more class. I love the countryside, but unfortunately, when it comes to GTAs, the city is the star of the game. And Los Santos, although technically perfect, didn't capture my heart like IV's or even III's Liberty City, Vice City or 2004 San Andreas.
And another thing that goes hand in hand with this - the soundtrack. Radio stations are one of things that add that "GTA magic" to freeroaming. And V's radio stations are serious letdown. There are some great songs in there, but they are more like hidden gems. Of course, every previous GTAs had songs I didn't like, but they grew on me. Not so with V's. And who had the horrible idea of mixing genres on radio stations? Los Santos Rock Radio especially suffered from this and when classic rock stations are usually your favorites throughout GTA series, it hurts.
In the end, IV and V are neither perfect games. But I just like IV much more. I don't know, maybe it's just because I'm now suffering from the same kind of nostalgia people have for Vice City, except in my case, it's for IV. That game grew on me so much it will be probably hard for R* to beat it with any future GTA. However, these feelings aside, I think IV was just much better structured and focused. V has loads of amazing ideas and concepts, but they feel unfinished and it feels like R* just tried way too hard to please everyone, so they started doing hundreds of different things and finished none. As insane the five year long development time was, V needed even more. Not because of this next-gen crap, so they could throw even more sh*t in, but just to fine tune to perfection what already was in the game.