This is the argument laid out, exactly the one you bring up, in Plato's Euthyphro. In it, Socrates raises this point to his friend Euthyphro, phrased as "what is pious?" Is something pious because it is loved by the gods, or is something loved by the gods because it is pious. It turns out, Euthyphro couldn't give a sufficient account of what is pious and scuttles off to court, charging his father with murder. The modern argument is called the "trickle down theory of Good," where there must be an ultimate Good to legitimize all Good actions.
There are many rebuttal's to this, but I'll just choose a quick one. To say that something is bad smelling, we don't need a "greatest worst smell." It's not a great argument, but others such as darwinian origins of morality, eudomonia, hedonism, etc., are all classical and modern attempts to answer the question. Inventing a list of yeas and nays from a fabricated god solves very little.