A man was shot and critically wounded Wednesday in an apparent gang-related attack in Lancaster, authorities said.