On a freezing Sunday morning, Marge gathers the family to go to church. Homer refuses to go, much to her annoyance and dismay, after he sees the weather outside and accidentally tears his church trousers. Staying behind, he sleeps in late, dances in his underwear (à la Tom Cruise in the film Risky Business), makes his special waffle recipe, wins a radio trivia contest, watches an action-packed football game, and finds a penny. Homer attributes his good fortune to skipping church and declares it the best day of his life. Meanwhile, Marge and the kids shiver their way through a rambling sermon, only to find themselves trapped at the end since the door has frozen shut. The congregation is forced to stay longer while Groundskeeper Willie defrosts the doors, and then Marge is unable to start her car because of the cold.
When she and the children finally get home, Marge is horrified to hear that Homer intends never to go to church again. She tries to persuade him otherwise, but to no avail. That night, Marge prays for her husband at their bedside. Homer tries to seduce her while she is doing so, but then falls asleep suddenly and has a dream in which God personally appears to him. God is furious with Homer for forsaking his church. Homer answers that "I'm not a bad guy, I work hard, and I love my kids... so why should I spend half my Sunday hearing about how I'm going to hell?" God agrees to let Homer worship in his own way. Homer starts following his own religion tailored to his personal tastes, including holidays he invents to get out of work.
Marge, Reverend Lovejoy and Ned Flanders attempt without success to bring Homer back to the congregation. One Sunday morning, while everybody else is at church, Homer falls asleep on the couch smoking a cigar, which ignites some magazines and ultimately sets the whole house ablaze. Homer wakes up but quickly succumbs to the thick smoke and faints. Apu, chief of Springfield's volunteer fire department, rushes to the Simpson house with other firefighters including Krusty the Clown, Chief Wiggum, and Barney Gumble. Meanwhile, Flanders runs into the burning house to rescue Homer and pulls him out just as the firefighters arrive. After the fire is out, Homer declares that God was delivering vengeance. Reverend Lovejoy counters that God was working through the hearts of Homer's friends, despite their different faiths. Homer agrees to give church another try and the next Sunday is there, albeit snoring loudly through the service. Appearing in his dreams again, God consoles Homer on the failure of his religion. He starts to tell Homer the meaning of life, but is cut off by the ending credits.