The context of Rom. 12:3-6 was of the spiritual gifts assigned to each by the Holy Spirit after their baptism into Christ, and each gift was according to the measure - that is God's measure, or God's determination - of their abilities.
The word "faith" is Strong's Greek 4102: "πίστις", and means "which see". From Thayer's Greek Lexicon: "1. conviction of the truth of anything, belief...; a conviction of belief respecting man's relationship to God and divine things..." Source: here
Those who see, understand and believe have faith. The more they see, know and believe, the stronger their faith in God and His son, the Christ.
For we cannot believe in something or someone we do not know, and we cannot have faith in someone we do not believe. Faith, being able to see, is a learning process, and comes from exposure to the word of God.
"4 How then shall they call on him in whom they have not believed? and how shall they believe in him of whom they have not heard? and how shall they hear without a preacher?
15 And how shall they preach, except they be sent? as it is written, How beautiful are the feet of them that preach the gospel of peace, and bring glad tidings of good things!
16 But they have not all obeyed the gospel. For Esaias saith, Lord, who hath believed our report?
17 So then faith cometh by hearing, and hearing by the word of God." (KJV)
And, faith of those who see - know and understand - through the word of God grows by continued exposure and testing of the word of God. The more knowledge we have, the more faith grows, and thereby faith is a direct result of God's word.
Thereby our faith comes from God because we are studying God's word that He gave to us by and through the Holy Spirit.
We have to hear His word, and read and study His word in order to know Him, see Him. The concept is not that God zaps faith into the hearts of those He chooses. We have to seek Him out (Matt. 7:7; Luke 11:9; John 7:34).
Those who believed the word of God in the first century A.D. when the book of Romans was written believed because they heard the word. They did not have the gospels in written form. They did not have the books of the NT that they could sit down and read as we have today. They could only hear it from those disciples and apostles who preached it vocally.
Therefore God determined to provide signs and miracles so that the people could know / see and believe those preachers, the teachers, disciples, and apostles of Jesus Christ (Acts 2:16-21).
"Ye men of Israel, hear these words; Jesus of Nazareth, a man approved of God among you by miracles and wonders and signs, which God did by him in the midst of you, as ye yourselves also know:" (KJV)
That pouring out of the Spirit on the day of Pentecost was the fulfillment of the prophesy from Joel 2. It was continued throughout that generation (Acts 2:39) for the purpose of authenticating and confirming the word of God so they could truly know the gospel was from Him.
Yet, they were only human, and began to compare the benefits of one gift against another, thinking themselves better than they ought (Rom. 12:3).
1 Cor. 2:14,
"But the natural man receiveth not the things of the Spirit of God: for they are foolishness unto him: neither can he know them, because they are spiritually discerned." (KJV)
The spiritual man, those who responded to the gospel call were at that time of the first century AD given a measure according to their knowledge and faith, which measure was taken by God. God knows our hearts (Prov. 21:2; 1 Kings 8:39; 1 Chron. 28:9; 1 Sam. 16:7).
Who then but God could take the measure of their abilities in order to assign/give the spiritual gift that would best be used by that person for the profit of God, for the purpose of God which was to spread the gospel to every nation.
They began using the newly acquired spiritual gifts to elevate themselves above one another. And, that was Paul's lesson again in 1 Corinthians chap. 12.
1 Cor. 12:8-11,
"8 For to one is given by the Spirit the word of wisdom; to another the word of knowledge by the same Spirit;
9 To another faith by the same Spirit; to another the gifts of healing by the same Spirit;
10 To another the working of miracles; to another prophecy; to another discerning of spirits; to another divers kinds of tongues; to another the interpretation of tongues:
11 But all these worketh that one and the selfsame Spirit, dividing to every man severally as he will." (KJV)
So, it was God who measured their hearts, and assigned the spiritual gifts according to their abilities that would best serve His purpose in preaching the word to others. Those spiritual gifts died out in that first century A.D. as the apostles and chosen presbyters (ie: Timothy and others) also died (1 Cor. 13:8-10).
Today, we have the written record of the scriptures. We have been given the ability to seek out God through the study of His word. The more we know, the more we see. The more we see, the more faith we have, and the more we become one in mind and spirit with God and Christ. He still measures our hearts, and will use us when and where He can to continue to spread the gospel call of Christ.