I also wasn’t told this directly from my grandfather, so it might not have even happened.
It would have been after WWII. Until 1949, all of Germany was divided into four occupation zones (American, British, French, Soviet) with Berlin (itself in the Soviet zone) also divided in the same way.
When Germany was finally partitioned into, East Germany (the German Democratic Republic or DDR) and West Germany in 1949, Berlin remained divided into four zones.
It's possible your grandfather and his friend were part of the UK's Area Troops Berlin (after 1953, the Berlin Infantry Brigade) who were stationed in the city and wandered into the Soviet zone by mistake and were shot at.
http://www.voicesunderberlin.com/Army%20Digest%20Photos/Berlin1959p4Sm.jpg