I would translate John 15:4-5 like this:
4 Abide in me, and I in you. Just as the branch cannot bring forth fruit from of itself were it not abiding in the vine, even so, neither can you if you are not abiding in me. 5 I, myself, am the vine, you the branches. The one who abides in me and I in him, he it is that brings forth much fruit. For without me, you cannot bring forth anything at all.
Details (click the image for easier reading):
In the previous chapter of John, Jesus is recorded as having just said to his disciples:
Believest thou not that I am in the Father, and the Father in me? the words that I speak unto you I speak not of myself: but the Father that dwelleth in me, he doeth the works.
-- John 14:10 (KJV)
The fruit of Jesus' sojourn on earth was made possible because the Father was in him, and he was in the Father, i.e. Jesus declared that it was the Father who was the source of his works and words.
When Jesus was teaching in the Temple, he said to the Pharisees:
28... When ye have lifted up the Son of man, then shall ye know that I am he, and that I do nothing of myself; but as my Father hath taught me, I speak these things. 29 And he that sent me is with me: the Father hath not left me alone; for I do always those things that please him.
-- John 8:28-29 (KJV)
The relationship Jesus had with the Father is surely what he would expect his disciples to want to have with him. So, in like fashion, one might expect a disciple of Jesus to say, "Jesus who dwells in me, he does the work. I do nothing of myself; but as Jesus has taught me, so I speak. For I do always those things that please him."
In Galatians 5:6, Paul says:
This I say then, Walk in the Spirit, and ye shall not fulfill the lust of the flesh.
Paul then goes on to give two contrasting sets of behaviours that the Galatians could use to identify whether they were being moved by the lusts of the Flesh (Galatians 5:19-21), or by the spirit of God (Galatians 5:22-23). In so doing, Paul was not saying that love, joy, peace, longsuffering, kindness, etc. were the exclusive preserve of Christians, as though people outside of Christ cannot behave in such ways, but rather, that the contentious spirit that had arisen in the church was typical of the first set, and not of the second. He was providing them an opportunity to reflect on their behaviour.
He says further:
And they that are Christ's have crucified the flesh with the affections and lusts.
-- Galatians 5:24 (KJV)
So, Galatians: Are you Christ's? Have you crucified the flesh (or, are you mortifying the deeds of the body, as Paul says it in Romans 8:13)? It's an easy thing to determine. Just look at the fruit of your efforts.
Conclusion
The fruit of a tree or vine is the end-product of all that it has done with what it has consumed, i.e. what it has taken in through the roots and foliage. Jesus is saying that it is the same with man.
17 Even so every good tree bringeth forth good fruit; but a corrupt tree bringeth forth evil fruit. 18 A good tree cannot bring forth evil fruit, neither can a corrupt tree bring forth good fruit. 19 Every tree that bringeth not forth good fruit is hewn down, and cast into the fire. 20 Wherefore by their fruits ye shall know them.
-- Matthew 7:17-20 (KJV)
A good tree produces fruit that is pleasing to the one who planted it.
Jesus teaching in John 15:5 applies generally in regard to ANY and ALL words and works (emphatic double negative in the Greek) -- whatever things are produced by a man's efforts. The fruit of abiding in Jesus should bring glory to the Father, as the fruit of his own efforts had. Jesus says so, just three verses later:
Herein is my Father glorified, that ye bear much fruit; so shall ye be my disciples.
-- John 15:8 (KJV)
So, Paul's use of "fruits of the spirit" in Galatians 5:22-23 is a specific example of the general principle Jesus was teaching in John 15 and Matthew 7. Paul's two sets of contrasting behaviours made it possible for the Christians in Galatia to reflect upon whether or not their works and words (the fruit of their efforts) were pleasing to Jesus and thereby bring glory to the Father.