Legalism as understood from Galatians is an addition to the gospel that nullifies the gospel (Galatians 1). Christ and his death are supplemented with some teaching or practice that makes one "in". Legalism cuts one off from the grace found in Christ and from the work of the Spirit. It ends up being of the flesh and brings its adherents into bondage.
Grace as in Christ and by the Spirit is where we're to live. This means a life in the Spirit which fulfills the goal of the law. A life of freedom as God's children.
The law in itself is not our goal. It is a guide to lead us to faith in Christ as Savior. And it is summed up in "the Jesus Creed": to love God with one's entire being and activity, and to love one's neighbor as one's self.