Hi,
I imagine this comes from the sport of baseball.
Here's the picture.
A player is standing on what is called 'a base'. If he leaves ('gets off') the base, the other team can cause him to be 'out' (meaning, roughly, he loses).
Thus, if you are 'off base', it means that you are not where you are supposed to be.
Best wishes, Clive