It's impossible to believe or continue to believe all the right things apart from God's miraculous gift of faith (Eph. 2:8, Jn. 6:65, Heb. 12:2) & some measure of his Spirit (1 Cor. 1:18-2:16), just as it's impossible to perform or continue to perform all the right actions as believers apart from God making it possible for believers to do that (Philip. 2:12-13, Jn. 15:4-5), & just as it's impossible to repent if a sin is committed apart from God making it possible to do that (2 Tim. 2:25, Acts 11:18, Rom. 8:13). So even if believers do continue to believe, act, & repent as they ought to, they must stay so humble they never give themselves any credit or glory (Lk. 17:10, Gal. 6:14, 1 Cor. 1:31). But at the judgment of the church, at Jesus' 2nd coming, he'll give them some credit (Mt. 25:21). Also, God does glorify saved people (e.g. Rom. 8:30).
---
While initial salvation is by grace through faith without works (Eph. 2:8-9, Titus 3:5, Rom. 4:1-5), initially saved people must have both faith & continued works of faith (1 Thes. 1:3, Gal. 5:6b, Titus 3:8) (not works of the letter of the Old Covenant Mosaic law) if they're to obtain ultimate salvation (Rom. 2:6-8, Jas. 2:24, Mt. 7:21, 25:26,30, Philip. 2:12b, 3:11-14, 2 Cor. 5:9, Rev. 22:14, Heb. 5:9, 6:10-12, 2 Pet. 1:10-11, Jn. 15:2a). For believers must actually continue to do righteous deeds if they're to continue to be righteous (1 Jn. 3:7, Jas. 2:24,26).
---
Gal. 5:18 includes a conditional "if", for the Holy Spirit doesn't take away the free will of saved people (1 Thes. 5:19). They can wrongly employ their free will to commit sin without repentance, to the ultimate loss of their salvation (Heb. 10:26-29, 1 Cor. 9:27, Mt. 7:22-23). Similarly, Gal. 5:22 isn't contradicting the fact truly saved people can wrongly employ their free will to quench the Spirit (1 Thes. 5:19) & indulge in fleshly pursuits (Gal. 5:17-21,26) without repentance, to the ultimate loss of their salvation (Gal. 5:19-21, Lk. 12:45-46, 2 Pet. 2:20-22, Rom. 8:13, 1 Jn. 5:16, Jas. 5:19-20).
Gal. 5:22-23's fruits are the fruits of Christians themselves (Lk. 6:44, 8:15, Jn. 15:8, Mt. 7:19, Philip. 4:17), but only so long as they choose to walk in the Spirit (Gal. 5:25-26) & abide in Jesus (Jn. 15:4-6), instead of wrongly employing their free will to quench the Spirit (1 Thes. 5:19) & not abide in Jesus (Jn. 15:6) & not bear good fruit (Jn. 15:2a), such as by wrongly employing their free will to become utterly lazy without repentance, to the ultimate loss of their salvation (Mt. 25:26,30, Jn. 15:2a,6).