"I greatly fear that by your self-righteousness you are building around your souls barriers that nothing can break down. You have been no nearer to God, no more working His works, no more imbued with His Spirit, than the professors in the nominal churches. You have had no real sense of the sacredness of the Sabbath, and God has not accepted your observance of His holy day. You have had no true consecration, no sincere devotion. God has not been honored by either of you; you have not known Him experimentally. You have walked apart from Him so long that He is nearly a stranger to you. Spiritual things are spiritually discerned; but you have so long cultivated worldly tastes and habits that it will not be easy for you to bend your mind in an opposite direction. 5T 431.1"
"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."
Both passages address the issue of outward profession versus inward reality. Matthew 7:21 speaks of those who say 'Lord, Lord' but don't do the Father's will, while the EGW passage speaks of self-righteousness and a lack of genuine devotion.
"They profess that they know God; but in works they deny him, being abominable, and disobedient, and unto every good work reprobate."
Both passages address the hypocrisy of professing to know God while denying Him in works. The EGW passage speaks of self-righteousness and a lack of genuine devotion, while Titus 1:16 speaks of those who profess to know God but deny Him in their actions.