Paul's main thought is that he suffered the loss of all things to gain Christ, to know Him, to know the power of His resurrection, and to know the fellowship of His sufferings.
The word translated "fellowship" here is the same one translated as "communion" in reference to the Passover bread and wine (see I Corinthians 10:16). Out of this comes a principle regarding suffering: It brings us into fellowship with others who have suffered or who are suffering similarly. To put it differently, we do not really know someone until we have suffered alongside him. If we suffer with someone, it is a form of fellowship, and a powerful bond develops from it.
Therefore, if we are suffering, even if it is not directly because of our beliefs, it gives us an opportunity to fellowship with Christ. He experienced life as a human being just like us, and we would be hard-pressed to find a circumstance that He cannot relate to. However, it is even more critical for us to relate our sufferings to what He suffered—rather than the reverse, to keep the focus on His experience more than our own—because it is in that comparison that we begin to get a clearer picture of our Savior.
Paul says he suffered the loss of all things to know the fellowship of Christ's sufferings, recalling his desire to be as closely conformed to Him as possible. Because a common experience helps us get to know someone, Paul wholeheartedly believed that it was worth having similar afflictions as Jesus throughout his Christian life of service, because it meant that he would know Christ that much more.

