This question is answered by the Greek text: τῃ γαρ χαριτι εστε σεσωσμενοι δια της πιστεως· και τουτο ουκ εξ ὑμων· Θεου το δωρον, ουκ εξ εργων· ἱνα μη τις καυχησηται· “By this grace ye are saved through faith; and This (τουτο, this salvation) not of you; it is the gift of God, not of works: so that no one can boast.” “The relative τουτο, this, which is in the neuter gender, cannot stand for πιστις, faith, which is the feminine; but it has the whole sentence that goes before for its antecedent.” Adam Clarke
And that not of yourselves - That is, salvation does not proceed from yourselves. The word rendered “that” - τοῦτο touto - is in the neuter gender, and the word “faith” - πίστις pistis - is in the feminine. The word “that,” therefore, does not refer particularly to faith, as being the gift of God, but to “the salvation by grace” of which he had been speaking. This is the interpretation of the passage which is the most obvious, and which is now generally conceded to be the true one; see Bloomfield. Many critics, however, as Doddridge, Beza, Piscator, and Chrysostom, maintain that the word “that” (τοῦτο touto) refers to “faith” (πίστις pistis); and Doddridge maintains that such a use is common in the New Testament. As a matter of grammar this opinion is certainly doubtful, if not untenable; but as a matter of theology it is a question of very little importance. - Albert Barnes
By grace ye are saved through faith - Grace, without any respect to human worthiness, confers the glorious gift. Faith, with an empty hand, and without any pretence to personal desert, receives the heavenly blessing. And this is not of yourselves - This refers to the whole preceding clause, That ye are saved through faith, is the gift of God. - John Wesley
For by grace (tēi gar chariti). Explanatory reason. “By the grace” already mentioned in Eph_2:5 and so with the article.
Through faith (dia pisteōs). This phrase he adds in repeating what he said in Eph_2:5 to make it plainer. “Grace” is God’s part, “faith” ours.
And that (kai touto). Neuter, not feminine tautē, and so refers not to pistis (feminine) or to charis (feminine also), but to the act of being saved by grace conditioned on faith on our part. Paul shows that salvation does not have its source (ex humōn, out of you) in men, but from God. Besides, it is God’s gift (dōron) and not the result of our work. - Robertson's Word Pictures
It is the gift of God. The salvation is not due to ourselves, but is God's gift. The grammatical construction of the Greek does not allow us to make "faith" the subject of the last clause. It is not "faith," but salvation through the faith, which is the gift of God. So says John Wesley in his Notes: "This refers to the previous clause, That you are saved, etc." - PNT