"But I walk by the Spirit, and you will not gratify the desires of the flesh"
~ Galatians 5:16
This is a promise. The one definitely leads to the other. The Holy Spirit begins our journey of holiness by reminding us of who we are in Christ. He enables us to live the holy lives that God requires and this we can never do by ourselves.
If you try to fight sin in your own effort, you will never experience inward change. It is only the Spirit of God who produces the kind of change that transforms our hearts and enables us to live in accordance with God's laws.
God has made an assured provision for believers to live by the Spirit, thus fulfilling God's law. The one who submits himself, unrestrained, to the Holy Spirit will live a life that pleases the Lord, as he's able to put to death the deeds of the body by the power of the Spirit.