As far as deities' really dangerous attacks go, the worst I found was the Divine Blast SDA from a high-Cha deity. It ignores SR, DR, antimagic, has no save, and destroys walls of force and prismatic effects on the way to you (from 1 mile per divine rank away). It'll do enough damage to bust through pretty much any physical barrier. A DR 3 deity could easily have a mid-50's charisma score, something like 56d12 with no save from 3 miles away would average 364 damage. A Barbarian 40 with a Con of 40 could barely take 2 of those, and that amount of hp is going to be the exception.
If the gods grab the improved SR SDA, their SR will be around 55, which will be pretty tough to beat for a completely dedicated spellcaster, impossible for a halfway spellcaster. Taking the SR improvement twice is as good as magic immunity.
At level 40, our base saves will be between +26 and +32, plus stat bonuses and resistance bonuses should be above +40 to all saves. The highest save DC one of the gods will be able to manage won't be much above 45, 50 at maximum. Unfortunately, we also probably won't be able to get our DCs that high, and the gods' saves will also be pretty high.
The aformentioned high-Cha god will have an AC of about 50 from deflection, natural armor, and divine bonuses. I'd count on a total AC of about 70ish, and it'll be over 80 if it's really trying hard.
Sneak attacks are one way to go, but it's entirely possible that gods will be immune to crits, have uncanny dodge, have some type of self-concealment, or just have ACs that a rogue can't hit.