The question that is being asked is not an easy one. It is not easy because it has to do with some of the more difficult parts of Hebrew language and usage. The areas of concern are:
- What does "Elohim" (הָאֱלֹהִים) mean?
- What does "son of" (בְנֵי) mean?
What does "Elohim" mean?
In Hebrew usage, "el" means "god." But when it is used in the plural ("Elohim") things get more difficult. Here are some examples:
- God: In the opening words of Genesis, the form for "God" is plural. But it is connected to a singular verb "he created". And, in context, it's clear that there's only one God. This is further strengthened in many other parts of the Bible which assert that there is only one true God (e.g.Deut. 6:4, et al.)
- gods: There are many places where "el" is in the plural "Elohim" because the Bible is referring to many (false) gods.
- Angels: There are some parts of the Bible where it seems pretty clear that the phrase "sons of God" are referring to angels (cf. Job 1:6;2:1)
- God's representatives (leaders/judges): In Exodus 21:6, we read "”וְהִגִּישׁוֹ אֲדֹנָיו אֶל־הָאֱלֹהִים“ (Exodus 21:6 HMT-W4)", "His masters will have him approach the 'gods'" (translation mine). In that context it's pretty clear that "Elohim" refers not to God directly, but instead, to God's representatives (Judges/Leaders/etc)
Note, though, that the bottom two example are very rare in the Bible.
Those are the tools in your Hebrew toolbox for "Elohim."
What does "son of" mean?
These are your options for the phrase, "son of":
- Biological son: Take the account of Abraham as an example: “<2> But Abram said, “Sovereign LORD, what can you give me since I remain childless and the one who will inherit my estate is Eliezer of Damascus?” <3> And Abram said, “You have given me no children; so a servant in my household will be my heir.” <4> Then the word of the LORD came to him: “This man will not be your heir, but a son who is your own flesh and blood will be your heir.”” (Genesis 15:2–4 NIV11-GKE). The context is very clear. Abram says that he is childless. The the Lord tells him he will have a son.
- Descendant: “<11> “ ‘The LORD declares to you that the LORD himself will establish a house for you: <12> When your days are over and you rest with your ancestors, I will raise up your offspring to succeed you, your own flesh and blood, and I will establish his kingdom. <13> He is the one who will build a house for my Name, and I will establish the throne of his kingdom forever. <14> I will be his father, and he will be my son.” (2 Samuel 7:11–14 NIV11-GKE). Here the context is a family line (house, seed, etc)
- Having a strong connection to: In this context, when the phrase "son of" is connected to a noun, the noun describes, if not even defines who that person (or group) is. For example: “Eli’s sons were wicked men; they did not respect the LORD” (1 Samuel 2:12 CSB17) Where it says there that Eli's sons were "wicked men," the Hebrew reads: "sons of worthlessness" (”בְּנֵי בְלִיָּעַל“ (1 Samuel 2:12 BHS-T))
Let's put it all together
As we work with all the options on the linguistic table there are some overall considerations that we need to keep in context:
- The Bible consistently speaks against polytheism
- The result of these 'sons of God' approaching the 'daughters of men' is that they had children.
With this in mind, there are some options that become far less likely. "Sons of gods" is factored out, since there are so many strong warnings against polytheism. "Angels" is a weak choice both because this usage of "sons of God" is exceedingly rare, and because there are no other examples in the Bible where angels have sexual intercourse with women and produce children. Taking "sons of God" in a representative of God context (judge/leader) would fit biologically (leaders of the Hebrews having sex with women), but it would be lacking support contextually: Why would God be so grieved and angry at this?
The best option is to take "sons of" in its descriptive sense and "Elohim" in its natural, "God" sense. In this context the "sons of God" are believing men who then run after unbelieving women and have children through/by them. This explanation holds together the preceding and further context. Moses here is laying a foundation as to why a flood was necessary. Instead of believing men finding and marrying believing women, they went after unbelieving women. And the community of believers shrank. Godlessness increased.
Nephilim
With the preceding vital context in mind we can now begin to tackle who the "nephilim" were. Moses tells us: “<3> And the LORD said, “My Spirit will not remain with mankind forever, because they are corrupt. Their days will be 120 years.” <4> The Nephilim were on the earth both in those days and afterward, when the sons of God came to the daughters of mankind, who bore children to them. They were the powerful men of old, the famous men.” (Genesis 6:3–4 CSB17)
Humans were thoroughly corrupt (”בְּשַׁגַּם הוּא בָשָׂר“ (Genesis 6:3 HMT-W4)). They, the male children produced by this union of believing men and unbelieving women, were described in two ways:
- Powerful: (הַגִּבֹּרִים) They were strong and mighty, but the opposite of noble and heroic. Lamech then becomes the strongest early example of this who brags for his murdering.
- Men of name: (”אַנְשֵׁי הַשֵּׁם“ (Genesis 6:4 HMT-W4)) They had clout and reputation. Boys wanted to grow up to be ruthless, tyrannical, and self-serving, just like these nephilim were.
Sadly, the footnote in the ESV is fairly weak. "Giants" is not the best translation of "powerful ones" (הַגִּבֹּרִים). Much later on, in David's time there were Nephilim. And, of course, Goliath become the prime example of these sorts of Nephilim. But that is much, much later.