Paul here connects the work of the Spirit to the body of Christ. This metaphor for the church obviously highlights the concept of unity because a body is made up of various parts joined together. Paul uses this metaphor several times in his letters. In using it here, he is referring to the people of God from every period and from different places; although separated by time and space they are united together. Of course, the image of a body reminds us that the unity is expressed through variety of functions and uses and not in uniformity.
This living union is achieved by the indwelling of the Holy Spirit. This is what each Christian has in common with every other Christian. They differ in social status, in spiritual gifts, in Christian growth and in many other aspects of their lives. But the same Spirit indwells each. He has regenerated each of them, he sanctifies each one, he leads them all to become holy, he is producing his fruit in each of them, he enables each of them to have access to the Father. So the connection to unity is obvious. Each believer has to respect other believers because the Holy Spirit indwells them.
Further, this spiritual union is expressed by a shared outlook for the future, the hope that is stimulated within them by the Holy Spirit. Earlier, in Ephesians 1:13-14. Paul said that the Spirit is both the earnest (foretaste or sample) and the guarantee of the heavenly inheritance for all Christians. The Spirit can give this assurance of the future to all believers. We know that there are varying degrees of this assurance, but this distinction should be regarded as an encouragement to have more confidence rather than an acceptance that we should have less. Anticipation of their shared future encourages Christian unity in the present.