I've only played the Civilization 4 and it's expansion packs, not Civilization 5 so I can only recommend buying the former.
However despite my apparent bias, I think you should get Civilization 4 and it's expansion packs just on principle, that principle being that if you're new to the series it makes sense to buy the cheaper yet more complete option, then if you find you like the series you could buy Civilization 5 at a later date, when it's cheaper and is bundled with expansions.
Civilization 4 is an excellent game that will keep you entertained for months, even years (if you find you like that kind of game) and the fact that a newer version has been released doesn't detract from it's greatness.
Some of the reasons that I haven't bought Civilization 5 yet, even though I'm a fan of the series, is that I'm still entertained with Civilization 4 and by some people's accounts that's still the better game.
I'm not sure if I'll like all the changes Civilization 5 has brought, so I'm not going to buy it until a few expansions have been released and more features added... I feel that going from Civilization 4 with all it's expansions and features to the plain vanilla version of Civilization 5 would feel like a step back, despite it being the newer game.