The Phalanx CIWS is an automated gun-based close-in weapon system to defend military watercraft automatically against incoming threats such as aircraft, missiles, and small boats. From Wikipedia
The close encounter marks the first use of the ship's last line of defense, successfully averting potential damage and casualties.