The answer to the question of Gal 3:5 is so obvious that it is not given. Paul proceeds at once to the illustration - the argument for the righteousness of faith furnished in the justification of Abraham. The spiritual gifts come through the message of faith, even as Abraham believed, etc.
Believed God (ἐπιστευσεν τῷ θεῷ)
See on Rom 4:5. Believed God's promise that he should become the father of many nations. See Rom 4:18-21. The reference is not to faith in the promised Messiah.
It was accounted to him for righteousness (ἐλογίσθη αὐτῷ εἰς δικαιοσύνην)
See on Rom 4:5. Ἑις does not mean instead of, but as. His faith was reckoned as righteousness - as something which it really was since all possibilities of righteousness are included in faith.