I believe Jesus was referring to the fact that many-possibly even most-rich people are so attached to their money and possessions that they would not sacrifice it in order to serve Him. Christians must be willing to give everything they have if God asks it of them. Christ said those words immediately after a very wealthy man had asked him what he had to do to receive eternal life. Jesus told him he would have to obey the commandments, sell everything he owned and give it to the poor and follow him.
The man was not willing to do that.
There are other scriptures that refer to God blessing people with riches, so I do not think being rich puts a person on the path to Hell.
It has more to do with what a person is willing to do for God.