Is something loved by the gods because it is pious, or is something pious because it is loved by the gods?
I'll switch over to monotheistic language for the discussion here.
Sounds like an innocent question or an interesting but academic debate, doesn't it? What makes a thing or an action good in the eyes of God? Like many good questions, there's more to it than you see at first. If you take door #1 where God loves something because that thing is good in itself, then God has recognized a standard for "good" that is separate from himself. Is God bound to recognize another standard? Who sets that standard? But if you take door #2 where the love of God causes something to be good, then what is good is arbitrary and could have been otherwise; it's not intrinsically good or right.
The usual Christian response has been that this is a false dilemma: that good traces back beyond God's approval and God's will, and has its roots deeper, in the very nature of God. There is no separation between what is good and the nature of God; they are the same thing. So there is no separate standard of good that God himself must acknowledge, and there is no other path of good that God might have decided.
While this answer has been generally accepted among Christians, it has been put forward, at times, without solid Biblical support. Does the Bible teach that right and wrong are rooted in the nature of God, or is that just a thing for the philosophers?
I'd like to offer two passages of the Bible -- already considered key passages by many Christians -- to show that this answer is deeply Biblical.
Consider this statement that is already considered key to understanding the nature of God:
God is love. (1 John 4:8)
Consider this statement where Jesus speaks of the nature of right and wrong:
Then one of them, a lawyer, asked him a question, testing him and saying, "Master, which is the great commandment in the law?"
Jesus said to him, "You shall love the Lord your God with all your heart, and with all your soul, and with all your mind. This is the first and greatest commandment. And the second is like to it, "You shall love your neighbor as yourself." These two commandments are the basis for all the law and the prophets. (Matthew 22:35-40)
So according to Jesus, all the laws -- and so all that is good and pleasing to God -- depends on love of God and neighbor. And love itself is the nature of God. That is to say, what is good and pleasing to God is based on who God is: God is love.
Or to put it in a short and simple form:
1. The character of God is love.
2. The foundation of morality is love.
3. Therefore, there is no separation between the character of God and the foundation of morality.