The gospel alone isn't enough to keep us from legalism. We need both the law and the gospel to keep us from legalism. And the law of God, correctly understood as a covenant and a standard or rule, is a necessary and powerful protection from legalism.