The use of "Gangway!" to tell people to get out of the way seems to be relatively recent (e.g. 100 years) in use.
There is a common equivalent expression in Cantonese, pronounced something like "Gwan-soy!".
Is there any evidence that the English term might simply be a mispronunciation of this Cantonese expression, perhaps as heard by naval or merchant marine seamen in Hong Kong?
This would be the same as how "Bombay", as a similar sounding English word, became the Anglicized version of "Mumbai" (or variations thereof).
Another example would be the French "chaise longue", meaning "long chair", which has become Anglicized as "chaise lounge". "Lounge" is a completely different English word, but it sounds similar to the French word for "long" and it's meaning fits well with the use of this furniture.
Inspired by: Meaning of 滾水 as Cantonese idiom - Chinese Language Stack Exchange