I have a project that will take a long time. It's about a bass vs. guitar battle.
The whole thing started out with the guitar part. That is something I created by just playing with the guitar. The bass part was created following the rhythm and some pitches. It seemed that the guitar was in G minor so I chose that for the bass also.

I've read a lot about chords and scales yesterday here on this forum and I decided to check the guitar part. Guitar pro tells me that 3 notes fall out from the G minor scale. So I made a version of where all the chords are part of the G minor scale.

My question is: what do you think about the original version? Is it okay or out of key? If it's okay then why is it okay despite that there is no G scale with those notes?.
The G minor version just doesn't sound right, it sounds too clear, less funky.
So it's theory vs. practice. Or am I the one missing out on something?

Opinions about the bass are welcome also.
Bar 26-27 are not part of the battle (yet?), I was just trying out something.

C4C is on if you want.
The original version is IMO better.

As for why it works.

First, it's actually closer to G Dorian than it is G minor.

G minor is: G A Bb C D Eb F

G Dorian is: G A Bb C D E F

So the only difference between the two is the E/Eb and unless I'm mistaken you don't use either of those in your bass track. You do however use it in your guitar track when playing the Am chord.

So, G dorian is your scale, and it explains why the Gm and Am both work. So all that's left is that Bb Minor chord, and it works for a couple of reasons.

First, two of the notes (Bb and F) are already a part of the scale, the C# note however isn't. It is however, the "blues note" from the Gm Blues scale, which you can safely add to just about any scale without sounding too weird so long as you resolve it. If you wanted to stay strictly in key, you'd change the C# to a D note changing your Bb minor into a Bb major, but then you lose all that nice tension that it adds.

The second reason is that when dealing with this kind of music, half step movements almost always work so long as you resolve them. You could use Gbm and Abm to add even more tension. Anyway, I'll post an example of this, just so you can see what I mean.
half step.gp5
Thanks for the explanation!
I think I need some time to understand it fully.