It strikes me that by combining building high-rise blocks with expanding out into the countryside we could manage it.
The planning situation in the UK (which is a particularly dense country) seems utterly despicable to me at present. The game being played is essentially 'haves' bemoaning the loss of small amounts of countryside while 'have nots' are stuck paying dramatic portions of their income to the former group.
Add to that the long arm of the law (buy a field and stick a trailer on it? expect a visit) and it's almost dystopian.
(please read my comments if you're interested more on the UK situation - others have shown me that in the US rural land is actually affordable, if you have savings)