Jaime Chávarri's 1977 film is named after a novel by Steinbeck, To an Unknown God, but has nothing to do with that novel. In the film a young boy who is in the vicinity of the death of Lorca in Granada grows up to be a magician and homosexual living in Madrid. He takes several trips back to Granada and meets up with a woman, Soledad, who belongs to the family that hid Lorca, and Pedro, who is also gay. The characters are somewhat difficult to keep straight, and the plot is rather meandering. It is more of a portrait of the main character.
When he goes to bed, the main character José listens to a reel-to-reel tape of (himself?) reading Lorca's "Oda a Walt Whitman." When he turns out the light the tape stops, but he continues to recite the poem himself. The first time, the fragment is from the first part of the poem, and the second time (the conclusion of the movie) it includes the famous harangue against "maricas de todo el mundo." This second time, José's lover is watching him get undressed, changed into his pajamas, and going to bed, but does not react in any way. it does not look like he will join José in bed.
There is certainly no joy in the recital of the poem at the end of the movie. The lover has apparently no understanding of Lorca. In an earlier scene, José had hid the photo of Federico before going to bed with Miguel.
Chávarri is also the director of "El desencanto," a famous film about the Panero family of poets, which also symbolizes the moment of "disenchantment" with the Spanish transition to democracy.