I don't think the Metrons really qualified as "gods," but rather people whose technology was just a bit more advanced than the Federation's. What did they have really? The ability to bring two starships to a halt in space would seem to be the big one, other than that the Metrons had a long range transporter.
The Metrons had the ability to reach out and scan both the Gorn and Federation combatant space vessels at extreme range while in high-warp flight. In a matter of a couple of minutes, the Metrons had both yanked the combatants out of high warp and teleported both vessels a distance of 500 parsecs (1,500 light-years and change), and at that distance, they kept both ships neutralized while abducting their captains to a habitable asteroid that was at least partially tailored for person-to-person combat. Those feats require remarkable abilities far beyond even the Federation of the 24th century.
There seems to be an emerging trend in this thread to lump a variety of unrelated aliens seen in STAR TREK together as "gods", without fleshing out what "gods" or "godlike" means. Is any alien race/alien/alien technology/alien phenomenon sufficiently powerful to stop the mighty starship in its tracks to be considered "godlike"? Why?
"The Gamesters of Triskelion" showed us extremely powerful aliens that were capable of disabling/destroying the Enterprise with seeming feats of magic against which Kirk and company could not devise a defense. The Providers of system M-24 Alpha were capable of instant teleportation of living beings across light-years, seeming telekenetically able to torture at will, change their "collars of obedience" without touching them. All those tricks showed us an alien society vastly superior to the Federation in terms of ability. Did that make the providers "gods"?
In a sense they were, since the Thralls all feared/hailed the Providers without hesitation and with great reverence. But Kirk threatened the Providers with the combined might of the Federation, and the Providers side-stepped the issue by assuring that the Enterprise's means of destruction would mask the true cause, leading any possible Federation investigation to conclude the ship was destroyed by a magnetic storm. Such a devious and cowardly act would not be the choice of a "god", would it?
It could be suggested that Apollo was far more powerful than the Providers, able to perform seeming magic tricks like transforming Lt. Palamas' day uniform into an ancient Mariah Carey-at-the-gala outfit. But was that just a mixture of extremely sophisticated transporter and transmutation technology, a few hundred (or a few thousand) years "above" the Federation?
Trelane seemingly had the power to produce a habitable (or semi-habitable) world in the middle of nowhere, keep it warm, and move it about to play cat-and-mouse with a starship. Does that make him a "god", or a master of illusion like the Talosians?
Gary Seven ("Assignment: Earth") was an agent representing a race of beings that could transport his more than 10,000 light-years to a secret headquarters on Earth that masqueraded as a posh office inside a New York City sky-rise. Gary's Beta Five computer could tamper with a Saturn V rocket launch. And Gary's cat was a woman... or the woman was a cat... Does that make Agent 194's sponsors "god"?
I have my doubts about any of these beings being god or godlike. A common theme in STAR TREK is that the Universe is a very, very ancient place filled with advanced life forms who have mastery of a variety of technologies and powers that dwarf the Federation. A concrete example of this would be Rojan and his Kelvan invaders from the Andromeda Galaxy. Consider this passage:
KIRK: What happened to your ship?
ROJAN: There is an energy barrier at the rim of your galaxy.
KIRK: Yes, I know. We've been there.
ROJAN: We managed to break through it with great difficulty. Our ship was destroyed. We barely managed to escape in a lifecraft. And now we have the means to begin our journey back to Andromeda.
SPOCK: Why use our vessel? Why not transmit a message to your galaxy?
ROJAN: No form of transmission can penetrate the barrier.
KIRK: Rojan, there's no reason to do this by force. Let's take your problem to the Federation. Research expeditions have catalogued hundreds of uninhabited planets in this galaxy suitable for colonization.
ROJAN: We do not colonize. We conquer. We rule. There's no other way for us.
MCCOY: In other words, the galaxy isn't big enough for both of us.
KIRK: The Federation has handled foreign invasions before.
ROJAN: Captain, we can control the Federation as easily as we can control you. The fate of the inferior in any galaxy.
Now, Rojan and his Kelvan friends had a bag of tricks not too far removed from Apollo. He and his soldiers quickly captured the Enterprise and subdued its crew, modified the ship to go at least Warp 11 for 300 years, and then transmuted over 400 Starfleet personnel into tetrahedronal shapes for suspended animation. That's all pretty magical, and may seem godlike to some, but the common Roddenberryan theme is that the Kelvans, Providers, Organians and other hyper-powerful entities are more advanced than us and we shouldn't pay them unquestioning allegiance just because they have a vastly superior "bag of tricks". Even Picard told Nagilum "we will fight you!"