In the Book of Mormon we learn that our works profit us nothing.
Mosiah 2:20-22
20 I say unto you, my brethren, that if you should render all the thanks and praise which your whole soul has power to possess, to that God who has created you, and has kept and preserved you, and has caused that ye should rejoice, and has granted that ye should live in peace one with another—
21 I say unto you that if ye should serve him who has created you from the beginning, and is preserving you from day to day, by lending you breath, that ye may live and move and do according to your own will, and even supporting you from one moment to another—I say, if ye should serve him with all your whole souls yet ye would be unprofitable servants.
22 And behold, all that he requires of you is to keep his commandments; and he has promised you that if ye would keep his commandments ye should prosper in the land; and he never doth vary from that which he hath said; therefore, if ye do keep his commandments he doth bless you and prosper you.
Even if we all kept every commandment of God, without the atoning sacrifice of Jesus Christ, none of us would be saved. It is the Christ that does the actual saving into the kingdom of heaven. Our works avail us nothing except that Christ has promised that if we do keep his commandment he will bless us with his gift of salvation and bless our lives. Without Christ, we are nothing. But with Christ we can overcome all things. God requires of us to do good works but they do not save us. It is his atoning sacrifice that allows us all to have success in this life and in the life to come. Jesus tell us that unless we do keep his commandments he may not grant unto us the gift of salvation into his kingdom, but this does not mean that our works save us. What it means is that Jesus will save us if we keep his commandments. The Lord has told us in no uncertain terms:
Matthew 7:21-23
21 Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven; but he that doeth the will of my Father which is in heaven.
22 Many will say to me in that day, Lord, Lord, have we not prophesied in thy name? and in thy name have cast out devils? and in thy name done many wonderful works?
23 And then will I profess unto them, I never knew you: depart from me, ye that work iniquity.