The passage appears in Chapter II during Nick's visit to Tom's apartment in New York where Tom carries on his affair with Myrtle. Nick has spent the afternoon at the apartment, first alone with Tom and his mistress and then as part of a drunken party that develops as Tom and Myrtle's guests arrive. Nick himself has too much to drink and observes the events unfolding around him through a "dim hazy cast." As the party goes on and the sun sets over the city, Nick grows restless:
I wanted to get out and walk eastward toward the park through the soft twilight but each time I tried to go I became entangled in some wild strident argument which pulled me back, as if with ropes, into my chair. Yet high over the city our line of yellow windows must have contributed their share of human secrecy to the casual watcher in the darkening streets, and I was him too, looking up and wondering. I was within and without, simultaneously enchanted and repelled by the inexhaustible variety of life.
While sitting inside the apartment, Nick imagines what its lighted windows would look like from the street below. A "casual watcher" would have no idea of what was happening behind those windows.
The passage is significant because it emphasizes the dual aspects of Nick's character in the novel. He is both participant and observer; he is drawn into life as he experiences it in the East; at the same time, it jars and frequently offends his Midwestern sensibilities. In this scene, Nick is "within and without," participating in a drunken party among strangers whose values are clearly not his own, while simultaneously stepping outside the environment psychologically to view it from an objective perspective. In the passage, Fitzgerald changes the physical point of view in describing the apartment to emphasize the two points of view from which Nick experiences life in New York.
It is noteworthy that Nick prefers to be outside on the street, walking away, but cannot seem to extricate himself from immediate events surrounding him. In much the same way, he is drawn into the tragedy of Gatsby's life and cannot extricate himself from the amorality of the East until Gatsby is dead and buried. Nick is in many ways "enchanted" by life in the East that is so different from his Midwestern upbringing, but the duality of his personality is resolved in the conclusion of the novel when he condemns it and goes home.
wow way to spoil it