GIF is limited to 256 colours and produces very large files for anything longer than a few seconds. ICNS is what macOS expects for app and file icons. GIF is at home in short looping clips and reactions; ICNS is the usual choice for macOS application and folder icons.
ICNS holds a single still image, so an animated GIF does not stay animated.
If the GIF is animated, only its first frame is converted and the result is a still picture. The picture is fitted into a square, with empty margins if it is not square, and written at 16, 32, 64, 128, 256 and 512 pixels (and 1024 when the source is at least that large), each as a PNG inside the icon file.