Razor by a mile. I can and have had decent and comfortable shaves with bath soap/water as the lubricant using a good blade. I can't say that about a second class blade and highly regarded shave creams, which I have also had experiences using.
Honestly, I think the lather's more important than the blade. I was away over the Bank Holiday weekend and had perfectly tolerable shaves using a disposable razor along with Taylor's of Old Bond Street cream applied with a brush.
I don't ever see myself bothering with canned foam or gel again. Even when travelling, a 99p Palmolive shave stick is far more convenient than a tin of Gillette - considering price, airport checks etc.
A quality soap or cream is the most important - with it you can always get a good shave with moderately priced $15 DE razors, with your dad or grandad's DE razor, with just about any cartridge razor, and with disposables that have a lot of blades in them.
Well ofcourse both go hand in hand. You just cant have a good blade with bad shaving cream as it is going to scrap your skin out.At the same time you cant have a bad blade which again scraps your skin out .
So you need to have a combination of both the blade and shaving cream being good.
I would also say the razor. A safety razor is much better for your skin than is a multiple blade cartridge razor. But I would never go back to using cream out of a canister. They tend to dry your skin. A quality shaving cream leaves your face feeling hydrated and supple.