The context of Matthew 7 is about differentiating between true and false prophets. Jesus said, "So by their fruits you shall know them" (Matthew 7:20). Genuine believers will produce "good fruits" (works).
The "will of the Father" is for us to place our trust in Jesus Christ and His work (John 6:40). True people of God will not utter false prophecies and teach a false gospel. Jesus had the self-righteous scribes and Pharisees in mind in uttering these words (Matthew 5:20).
If anything at all, then this passage only enhances the cause behind the "faith only" argument. Salvation involves moral transformation, but is not the instance of justification itself.