An armed man who approached a synagogue in a small Canadian community as Jews began Yom Kippur prayers was in hospital Monday after a gunfight with police stationed outside to protect worshippers.