It's actually quite interesting.
Berwick is a fortified town, and I speculate that the origin of the name Cannon Gate has to do with cannons, as in large guns.
The Edinburgh Canongate, however, refers to canons, as in clergymen.
Also 'gate' in this case isn't from gate as in entrance to something, but an alternative spelling of 'gait', which is the same usage as 'gata' in Scandinavia, where it means a street.
Sorry, that's a bit off topic.