Check
The king is in check when it is attacked by an enemy piece. A check must be resolved on the very next move: move the king, block the attacking line, or capture the attacker. Making a move that leaves your own king in check is illegal — which is exactly why checks are such a strong tactical weapon.
The rook on g1 checks along the whole g-file; Black must answer it right now.