node-gyp is a command-line tool that helps you compile native addon modules for Node.js. It handles the complexities of cross-platform compilation, abstracting away differences between operating systems and toolchains. Crucially, node-gyp ensures your Node.js addons are compatible with the specific Node.js version they are installed on, handling tasks like finding the correct headers and linking against the Node.js runtime. It supports various build systems and acts as a bridge between npm and native build tools.