OK, you need some context here.
The scribes and Pharasees were the Jews that took the most pride in following the law. These were the folks that did everything that the Old Testament told the people of Israel to do. All the prayers, all the ceremonies, all the feasts, all the sacrifices.
These guys kept fully kept the letter of the law, and when they broke it they made the necessary sacrifices. From the outside, they looked like they were doing it.
What Jesus is saying is that unless you are perfect. Even more perfect than the folks who kept the entire law, you weren't going to heaven. What he told the Pharisees is that they while they kept the letter of the law, they missed the spirit. In Matt 23:24 Jesus references this lack of understanding of the spirit of the law when he suggests that they are "blind guides! [who] strain out the gnat but swallow the camel." In this statement he references two animals that are not Kosher. The message is that they are nit picking on the small things so they outwardly appear to keep the law (straining the gnat), but they do not understand the heart of the law. He particularly criticizes their care of the poor. (swallowing the camel).
His point here is that man can't do it. There is absolutely no way that a person can fully keep God's law. This is the first half of the message of the gospel. You are a sinful creature and cannot keep God's law. So yes. Jesus is saying that on their own power, no one is going to heaven. The only person who did it was Jesus, he was born sinless and did no sin his entire life. And the only reason he was able to do that was because he was God.
Then Jesus took it a step farther. Instead of leaving you there, he went and died as a perfect sacrifice for our sins.
By believing in Jesus we are given his perfect life (this is called the imputation of Christ's righteousness). Thus God no longer looks at our sins, but instead looks at Jesus' perfection when he judges us.
Because we receive Jesus' righteousness when he becomes our Lord and Savior we are able to be more righteous than the scribes and Pharisees of old.