It takes a lot more time and money today to create a game of the scale of GTA. The 3D-era games were easier to create, not only because they were graphically not as advanced as modern games are but because they were using Renderware, a third-party game engine. It took two years to create GTA III, one year to create Vice City and two years to create San Andreas. Renderware had existed for many years and it was very flexible; it was used in a multitude of games in various genres. And to add to that, the graphics aren't everything that evolved over the years, there are also the mechanics, the physics, the Artificial Intelligence, and many more things that were bound to change.
GTA IV was like III in a number of ways. It was the start of a new console generation, and the fact that Renderware no longer existed meant that Rockstar either had to license a new third-party engine, or they needed to work on their own engine. I assume they went with the latter because there were no engines that were good enough for their games. That or it was too expensive. Not that this is a bad thing though, the advantage of an in-house game engine is that it allows for a higher level of optimization. IV was the first open world game to use RAGE, so it was optimization-wise not great. But it was good enough and the engine got better over time, as evidenced by games like RDR, Max Payne 3 and GTAV.
Obviously it doesn't only depend on the engine. Another important factor that needs to be considered is whether the developer wants to deliver a high quality experience for the player. Rockstar is an ambitious developer that wants to raise the bar with each title they release, and this takes time. That's why it took four years to create IV and five years to create V.
I have a feeling that they didn't quite know what to do with V. The final game was very different to the build we have seen in the 2011 debut trailer. There were a lot of changes during these couple of years, and there were even more of them in the years prior to the announcement. The beta hunt thread clearly shows that many features didn't make the cut, for reasons we don't know and never will know. Who knows, maybe Rockstar is a little too ambitious for their own good. The lack of communication within and between their departments doesn't really help, either.