Not quite. While there's no trespass law in Scotland, we do have the Right to Roam legislation which allows access to most places but private gardens/ houses are exempt (as are other things such as MOD land, land set aside for a particular recreational purpose etc) A gate has nothing to do with it