The gods and lords in 1 Cor 8:5 are identified equally as idols in 1 Corinthians chapter 8.
Now concerning food offered to idols: we know that “all of us
possess knowledge.” This “knowledge” puffs up, but love builds up. 2
If anyone imagines that he knows something, he does not yet know as he
ought to know. 3 But if anyone loves God, he is known by God.4
Therefore, as to the eating of food offered to idols, we know
that “an idol has no real existence,” and that “there is no God
but one.” 5 For although there may be so-called gods in heaven or on
earth—as indeed there are many “gods” and many “lords”— 6 yet
for us there is one God, the Father, from whom are all things and for
whom we exist, and one Lord, Jesus Christ, through whom are all things
and through whom we exist.7 However, not all possess this knowledge.
But some, through former association with idols, eat food as
really offered to an idol, and their conscience, being weak, is
defiled. 8 Food will not commend us to God. We are no worse off if we
do not eat, and no better off if we do. 9 But take care that this
right of yours does not somehow become a stumbling block to the weak.
10 For if anyone sees you who have knowledge eating in an idol's
temple, will he not be encouraged,if his conscience is weak, to eat
food offered to idols? 11 And so by your knowledge this weak
person is destroyed, the brother for whom Christ died. 12 Thus,
sinning against your brothers and wounding their conscience when it is
weak, you sin against Christ. 13 Therefore, if food makes my brother
stumble, I will never eat meat, lest I make my brother stumble (1
Corinthians Chapter 8).
Paul defined an idol as having "no real existence" (1 Corinthians 8:4). In this way, Paul could say that there exists one God and one Lord hand-in-hand with the existence of other gods and lords.
The Greek word θεοῖς (theois) occurred only twice in the NT (1 Cor. 8:5 and Gal. 4:8).
The point being substantiated is that these deities have no real existence since they do not subsist in God's nature. They are , in fact, not gods by nature (Galatians 4:8).