According to this article,
http://www.cbsnews.com/news/history-says-home-real-estate-is-a-bad-investment/
if you take out the recent housing bubble and just look at returns on real estate for the past 100 years, you will see that it returns a measly 1% average return.
And it suffers from a lot of other drawbacks (high transaction costs to buy/sell, low liquidity compared to stocks etc).
But you can still make money on it because of how it's purchased--with a mortgage (i.e. other people's money) so that you use leverage to goose your return. But this, IMHO, is not a great reason to invest in something. I can borrow money (from a HELOC?) to invest in stocks too and go from a 7% average return to something much bigger. But that second one sounds terrible, doesn't it? So why do we tolerate it in real estate?
Borrowing money to invest in a business with terrible returns is just as bad as using all cash to invest in a terrible business.
There's an old saying that you make money when you buy real estate, not when you sell it. If you can get something at a discount to the price you should be paying (because the economy sux, because you bought it as a fixer upper, because it's a foreclosure etc) then you are making money on the transaction irrespective of the method of financing.
So maybe the question you should ask before buying a property (to live in, to flip, or to rent out) is whether you would still think of the property as a good deal if you had to pay cash for it?
I read Benjamin Graham' (Warren Buffet's mentor) book, The Intelligent Investor, and it's amazing how the principles are applicable to anything including real estate. If you buy something cheap enough that there is a big margin of safety, you might not hit homeruns, but you will consistently hit singles and not endanger your capital. Just a random thought...