SUB is a stand-alone SUBMODULE. GOSUB is a GOTO SUBROUTINE. Though similar, they're quite different.
First big difference: SUB has localized variables. GOSUB's variables are of the same scope as the module they're located in.
Quick example:
X = 3
Gosub Foo 'Goto the Subroutine
Call Foo2 'Call the SUB
Foo:
PRINT X
RETURN
SUB Foo2
PRINT X
END SUB
With the gosub, the variable X is in the same module (the main module), so it prints 3. With the SUB, x is localized within the SUBMODULE Foo2, and has no value. It prints 0.
Due to this localized modulation, SUB makes for better "plug-and-play" code than GOSUB does -- thus the reason almost all libraries will use SUB instead of GOSUB. There's simply less chance of variable corruption with localized variables, and memory usage is smaller as those local variables free themselves when the module they're in closes.
Take this sub for an example:
SUB I13
I = 13
END SUB
Now, you rip that out of your existing program and add it to anything you like without issues, like so:
FOR I = 1 TO 10
PRINT I
I13
NEXT
In the above, I13 won't affect the value of I in that FOR... NEXT loop.
If it was a GOSUB, however, it would -- ending execution of that loop after a single pass.
In my personal opinion, SUB is a much better tool for use than GOSUB. It's just soooo much more portable and self-contained. 99.9987% of the time, I'd choose a SUB over a GOSUB.