Based on what I've read, Roger Zelazny wrote this book for his own pleasure, and later Samuel R. Delany persuaded him to publish it. It starts as if it's going to be "Lord of Light II," based on Egyptian mythology instead of Hindu, but it quickly becomes obvious that it's not.
For one thing, Zelazny creates his own mythological characters to exist alongside Osiris, Set and Anubis, such as the Steel General who has fought throughout history on the side of the oppressed. He is periodically destroyed by his enemies, but he is always rebuilt by people who need him. Sometimes he's a robot wearing a ring of flesh, sometimes he's a man wearing a ring of iron. There is also Typhon, a god who appears as a shadow of a horse and who may be a black hole.
There is also quite a bit of dry humor, and a chapter in verse.
It's not Zelazny's best work, but it's a fascinating and unpredictable ride. It's interesting to see how much wilder he was when he thought nobody was looking (though some of his later work also goes in this direction – age can make you more fearless).
Oh, and it includes the Agnostic's Prayer:
"Insofar as I may be heard by anything, which may or may not care what I say, I ask, if it matters, that you be forgiven for anything you may have done or failed to do which requires forgiveness. Conversely, if not forgiveness but something else may be required to insure any possible benefit for which you may be eligible after the destruction of your body, I ask that this, whatever it may be, be granted or withheld, as the case may be, in such a manner as to insure your receiving said benefit. I ask this in my capacity as your elected intermediary between yourself and that which may not be yourself, but which may have an interest in the matter of your receiving as much as it is possible for you to receive of this thing, and which may in some way be influenced by this ceremony. Amen."