I am satisfied with the answer that Jon Ericson has provided, but I would like to add a couple points. The problem lies with the passage's interpretation by the questioner. This passage is not really addressing wealth at all but rather man's attempt at self-justification before God. Let's view another account of the same story in the context of Luke 18. First, we read three parables.
And he told them a parable to the effect that they ought always to pray and not lose heart. 2 He said, “In a certain city there was a judge who neither feared God nor respected man. 3 And there was a widow in that city who kept coming to him and saying, ‘Give me justice against my adversary.’ 4 For a while he refused, but afterward he said to himself, ‘Though I neither fear God nor respect man, 5 yet because this widow keeps bothering me, I will give her justice, so that she will not beat me down by her continual coming.’” 6 And the Lord said, “Hear what the unrighteous judge says. 7 And will not God give justice to his elect, who cry to him day and night? Will he delay long over them? 8 I tell you, he will give justice to them speedily. Nevertheless, when the Son of Man comes, will he find faith on earth?”
Here, we find that Jesus says that God will give His elect "justice." We can assume from the passage that in this case, "justice" means mercy rather than God's wrath. Why can we say this? Because the "Son of Man" title Jesus speaks of in the next sentence is one describing the office He came to fulfill: a willing sacrifice having been perfect in the flesh, not judge of the earth at that time (John 3:17). However, Jesus poses a pretty strong challenge: "when the Son of Man comes, will He find faith?" It should make us ask: "faith in what or whom?" ...let us continue.
The next parable..
9 He also told this parable to some who trusted in themselves that they were righteous, and treated others with contempt: 10 “Two men went up into the temple to pray, one a Pharisee and the other a tax collector. 11 The Pharisee, standing by himself, prayed thus: ‘God, I thank you that I am not like other men, extortioners, unjust, adulterers, or even like this tax collector. 12 I fast twice a week; I give tithes of all that I get.’ 13 But the tax collector, standing far off, would not even lift up his eyes to heaven, but beat his breast, saying, ‘God, be merciful to me, a sinner!’ 14 I tell you, this man went down to his house justified, rather than the other. For everyone who exalts himself will be humbled, but the one who humbles himself will be exalted.”
The point of this passage demonstrates to us that the tax collector, symbolizing the worst of the most hated amongst society for the way they took advantage of others, is justified because he isn't look to his own merit to satisfy God's wrath. The pharisee is doing the opposite and is condemned.
In the next little bit, we read of the children coming to Jesus...
15 Now they were bringing even infants to him that he might touch them. And when the disciples saw it, they rebuked them. 16 But Jesus called them to him, saying, “Let the children come to me, and do not hinder them, for to such belongs the kingdom of God. 17 Truly, I say to you, whoever does not receive the kingdom of God like a child shall not enter it.”
I've heard countless times that this passage is an admonition not to question the Christian faith or ask any tough questions. It disappoints me to hear these things and makes me want to scream. Such teaching is not of Christ, it's of brain-washing cults!
So what does this passage mean? Remember that it's in the context of people claiming righteousness in themselves rather than God's imputed righteousness. It also says that the parents were brining even their infants to Christ and Christ said "to such belongs the kingdom of heaven." Let me ask this... for what in life does an infant rely on himself, that he might have it? Nothing.
Finally we get to the rich young ruler. For brevity, I won't quote the scripture. Essentially, this rich, powerful man asks Christ how to have eternal life. Christ tells him, in a nutshell, "keep the Jewish law you've been given." The RYR says "I have."
And here is where the RYR's self-righteousness comes through. The Law is a bona fide means of salvation only to those who can keep all of it (see the book of James). In Romans, we read that even though The Law offers a bona fide offer of salvation, its purpose was not to save people by their own righteousness. Its purpose is to stop every mouth, that we would recognize our hopeless estate before God, that nothing Good dwells in us apart from God.
So the RYR was telling Jesus "I've kept The Law. I am righteous," but Jesus knew that this was not the case because the entire purpose of The Law is to prove that you cannot please God in your flesh. So, Christ calls the RYR's bluff and says: "prove it. Sell everything and follow me." ...but the man cannot, because he would lose his power and everything that he believes justifies himself before God would crumble before him.
Materialism is a bad thing, but to claim that this passage is about materialism violates the beauty of the Gospel message in these sections.