The idea that the Spaniards were gods didn't hold very long. The Aztecs even sent body parts of captured and killed Spanish soldiers (and their horses) to display in cities and villages for the propaganda effect (see: they are not gods they bleed and die like everybody else).
In the end the defeat of the Aztecs was decided just as much by politics as by violence.
Also it's not like Cortez won every battle, they were even catastrophically defeated in the "night of tears". Coming back from that defeat wouldn't have been possible without indigenous allies and their thousands of skilled and well-equipped warriors fighting on Cortez' side against the Aztecs even after Cortez was driven out of Tenochtitlan (and not to mention logistic support which was probably even more important).