For most of the tragic play Antigone, Sophocles relegates the gods to the background and treats them as little more than unseen observers who take no active role in the events of the play.
Early in the play, when Ismene refuses to help Antigone bury their brother, Polyneices, Antigone makes a passing reference to the will of the gods.
ANTIGONE. As for thee,
Scorn, if thou wilt, the eternal laws of Heaven.
Otherwise, the "eternal laws of heaven" aren't part of Antigone's appeal to Ismene. Antigone appeals to Ismene as her sister and as Polyneices's sister to do what's right for Polyneices.
On his entrance in the play, Creon perfunctorily credits the gods with bringing an end to the civil war.
CREON. Elders, the gods have righted one again
Our storm-tossed ship of state, now safe in port.
Then Creon gets down to other business, including making an official edict forbidding anyone from burying Polyneices, on pain of death. When the Guard reports to Creon that an unknown individual tried to bury Polyneices in violation of Creon's edict, Creon uses references to the gods to ridicule Polyneices.
CREON. Is it not arrant folly to pretend
That gods would have a thought for this dead man?
Did they forsooth award him special grace,
And as some benefactor bury him,
Who came to fire their hallowed sanctuaries,
To sack their shrines, to desolate their land,
And scout their ordinances? Or perchance
The gods bestow their favors on the bad.
The Guard thanks the gods for letting him escape with his life after making his report to Creon, but there's no substantive reference to the gods in the play until after Antigone is apprehended trying to bury Polyneices.
Even then, the gods serve as little more than a frame of reference for what Antigone considers are the "immutable unwritten laws" by which men and women lived their lives from time immemorial.
CREON. And yet wert bold enough to break the law?
ANTIGONE. Yea, for these laws were not ordained of Zeus,
And she who sits enthroned with gods below,
Justice, enacted not these human laws.
Nor did I deem that thou, a mortal man,
Could'st by a breath annul and override
The immutable unwritten laws of Heaven.
They were not born today nor yesterday;
They die not; and none knoweth whence they sprang.
Nevertheless, Antigone is referring to the gods' laws, not to the gods themselves.
Teiresias first makes reference to the gods in an active role in reaction to Creon's edict and what's ensued as a result of his decree.
TEIRESIAS. O King, thy willful temper ails the State,
For all our shrines and altars are profaned
By what has filled the maw of dogs and crows,
The flesh of Oedipus' unburied son.
Therefore the angry gods abominate
Our litanies and our burnt offerings ...
Creon is unmoved. He berates the Chorus for bringing the seer-prophet Teiresias to him and vows not to change his mind about refusing to bury Polyneices.
CREON. Ye will not purchase this man's burial,
Not though the winged ministers of Zeus
Should bear him in their talons to his throne.
Creon also refuses to lift the death sentence for Antigone, and Teiresias again presses Creon to change his mind.
TEIRESIAS. For that thou hast entombed a living soul,
And sent below a denizen of earth,
And wronged the nether gods by leaving here
A corpse unlaved, unwept, unsepulchered.
Herein thou hast no part, nor e'en the gods
In heaven; and thou usurp'st a power not thine.
For this the avenging spirits of Heaven and Hell
Who dog the steps of sin are on thy trail:
What these have suffered thou shalt suffer too.
Creon remains obstinate.
The Chorus then urges Creon to reconsider his actions.
CHORUS. ... Vengeance of the gods
Is swift to overtake the impenitent.
Creon eventually changes his mind, but the Chorus's warning comes too late. The gods have already put their plan of vengeance into motion.
By the time Creon gets to the cave where Antigone was shut up to die, he finds her already dead by her own hands. Creon's son, Haemon, betrothed to Antigone, is at the cave. He first tries to kill Creon for causing Antigone's death, and when he fails to kill Creon, he kills himself.
The Chorus provides the epilogue for the play, and the moral of the tragedy.
CHORUS. Of happiness the chiefest part
Is a wise heart:
And to defraud the gods in aught
With peril's fraught.
Swelling words of high-flown might
Mightily the gods do smite.
Chastisement for errors past
Wisdom brings to age at last.
To what extent, however, did the actions of the gods cause the tragic events of the play? Once Creon made his edict, might not all of the events of the play have occurred without the gods' intervention?
If the gods did intervene, at what point in the play did the gods start to effect changes in the course of the play? Was it at the moment that Creon made his edict forbidding Polyneices a burial? Was it when Creon condemned Antigone to death? Was it when Creon insulted the gods after it was discovered that someone tried to buy Polyneices?
What events did the gods actually put into motion? Did the characters in the play exercise any free will at all? Was everything that happened in the play simply the characters' fate, as decreed by the gods? Were the characters simply puppets, acting out the will of the gods?
It could be argued that the action of the play was driven wholly by the characters themselves, not by the gods, and that the tragic events were attributed to the gods only in retrospect. Only the gods know for sure.