The Greek word ‘elements’ means ‘any first things from which others in a series, or a composite whole, take their rise’ and comes from a word meaning ‘a row, rank, series’. It was used of letters of the alphabet as elements of speech (Vines).
Is Paul including Gentiles in this statement? At first sight it would appear not, for the context is the law given to Israel (Galatians 3:17). It is they who have passed through these great stages in the unfolding plan of God, and in Galatians 4:5 where Paul speaks of their deliverance from this bondage, he talks in terms of them being redeemed from under the law of Moses. However we must keep in mind that God made Israel an object lesson for the whole world. When Israel was explicitly placed under the law at Sinai, it was not the start of the law’s jurisdiction over them. Every individual Israelite, in common with every other member of the human race, was born under the law, and Sinai was merely a reminder of this. Israel represented two peoples at once. As the descendants of Abraham they were a typical people representing the church of God, for God chose to give them privileges not given to any other nation and blessed them with the temple worship and the priesthood. But at the same time they remained for the most part an unbelieving people and so represented the unbelieving world which, however great the privileges it receives from God, remains at enmity with him in its heart. Accordingly Israel under the covenant of Sinai represents every unbelieving human being born under the law of God. Therefore in spite of the glorious truths prefigured by the ceremonial law concerning the work and person of the Lord Jesus Christ, these ceremonies and rituals are rightly called the elements of the world. In themselves they have no power to save, for they cannot take away sin, cleanse the conscience, or provide justification. When Israel began to treat them as an end in themselves they turned even these God given elements of worship into idols. Paul is not just thinking of the state of Israel but of all who are without faith in Christ Jesus. This is clear from Galatians 4:8 in which he expounds the former servitude of the Galatians to their false gods as the practice of idolatry, and then in Galatians 4:9-10 warns them not to turn again to this servitude by observing elements of the Jewish ceremonial law (repeating the word ‘again’ twice).