Only by knowing God we can have this love—and it is only by loving that we can know God. If that sounds like a riddle, it is not intended to be. Nor is it intended to sound like a vicious circle.
It is, though, somewhat like "Which came first, the chicken or the egg?" We know that God is Creator—that the chicken came first—but science disputes this. There must be a beginning of the cycle because one depends on the other. In terms of knowing and loving God, knowing Him is dependent on loving Him, and loving Him is dependent on knowing Him. The two cannot be separated.
Only by learning to love God do we learn what His nature is like, that is, what He is like. Yet, we cannot have that love until we first come to know Him. It is through fellowship with Him that we come to know Him and receive the love. In using that love, we come to be like God, and only then do we really know Him.
John is saying that it is only in experiencing God's love ourselves that we come to know Him. This kind of love is something that we have to practice. All of this is possible because God—at the beginning of the cycle—by His love initiates the relationship with us. At that point, by His love, He is the primary sustainer of the relationship. If He were not the primary One sustaining it, we would not have enough love to continue the relationship. So, Paul writes in Romans 5:10, we are saved by His life. He takes the burden of our salvation primarily on His shoulders. And that is very comforting indeed.
God calls us and grants us repentance, each being an act of love. He then forgives us because we repent. That, too, is an act of love. He then gives us His Spirit, by which we can fellowship with Him and live in His presence. This is also an act of divine love.
By His giving us His Spirit, we begin to have elements of His love in us, so now we can begin to love Him. We are in fellowship with Him and can give that love back to Him. We experience it, and in experiencing it, we begin to know what He is like. The cycle is working! And as we give love back to Him, He gives more to us because we are growing. God's love in us starts to be perfected.
Thus, God in His love begins the cycle, and He in His love keeps the cycle going. However, it requires a response on our part: We must return to Him the love He sheds abroad in our hearts and give it out to others.