Gatsby and Holden seem very different. For one thing, Gatsby is much older and experienced. He served in World War I and actually became an officer. Then he got into criminal activities and became a wealthy man. He is very much goal-oriented. In the novel he wants Daisy and goes to considerable trouble and expense trying to win her away from her husband. Holden, on the other hand, doesn't seem to know what he wants. When his little sister Phoebe questions him about it, he comes out with the rather pathetic answer that he would like to be a catcher in the rye. Perhaps Gatsby has the advantage of not having been born into the upper-middle class like Holden. Gatsby had to struggle for everything he obtained. As a result, he appreciates the things life has to offer, as symbolized by his enormous roadster. Holden is likable, but he comes across as a "spoiled rich kid." He squanders his money in New York because he doesn't understand how hard it is to get money in this world. He has his pockets full of money but did nothing to earn any of it. "The Catcher in the Rye" seems to lack direction because it is not clear what Holden is looking for. There is no MacGuffin. Salinger himself seems to have had that feeling about his own novel--that it was episodic. Gatsby knew exactly what he was looking for: he was looking for Daisy and perhaps for entrance into the American upper class. Holden and Gatsby wouldn't have had anything in common if they had met. Gatsby would have regarded Holden as just one of the playboy types who frequented his wild parties, and no doubt Holden would have behaved like one of them. Holden was a budding intellectual. Gatsby was never an intellectual but more a man of action. Nick Carraway refers to Gatsby a couple of times as a "roughneck." That term is not in much use today, but it meant approximately the same thing as "thug" or "hoodlum." Gangsters tended to be admired during Prohibition days because so many citizens were breaking the law themselves by drinking bootleg booze and frequenting speakeasies. Gatsby seems like an outlaw trying to go straight, whereas Holden seems somewhat like a straight citizen trying to become an outlaw. Getting kicked out of three prestigious prep school at the tender age of sixteen seems like a bad start in life.
There are some thematic connections between Holden Caulfield and Jay Gatsby: deception, self-deception and illusion/delusion.
Jay Gatsby is a person who intentionally obscures his past and lies about it, effectively creating a persona for himself that acts as a performance.
Holden is not outwardly deceptive in this way, but he does resemble Gatsby in his belief in certain romantic self-conceptions. Holden dreams of going to the woods to live in isolation. This dream is no more or less romantic than Gatsby's vision of himself as fulfilling his romance with Daisy and achieving a perfection of romantic love. Notably, Holden also imagines bringing his girlfriend with him to the woods and, carried away by the idea, invites her to join him in rustic isolation.
Holden also conjures up an image of nature and innocence intertwined when he makes a spur-of-the-moment proposal to run away with Sally Hayes. He talks about living in "cabin camps" and later getting a house near a brook, somewhere in rural Massachusetts or Vermont, away from the corruption of the city. Sally's dismissal of the notion reinforces his outsider status again. (eNotes)
Additionally, Gatsby believes that one can repeat the past. This state of basic delusion and fervor matches Holden's emotional state which leads him to talk to his dead brother. The unreal becomes real and the impossible becomes possible for both characters, at least in their minds.