Each of these stories feature men who dream, who deceive and who are willing to engage in fantasy.
In relation to the American Dream, both these characters, Willie Loman and Jay Gatsby, yearn for a material greatness inspired by 1) humble beginnings/means and 2) a rather specific vision of success (which has no moral associations and no moral prerequisites).
Both are not only willing to lie, a bit, to achieve success, but both lie about that success, albeit in different ways. And both lack any real moral strength, which after all might be requisite for the achievement of the American Dream.
In Death of a Salesman, Willie Loman lapses into nostalgic egoism, recalling past successes and greatly exaggerating them. He leans heavily on one lie in particular which is that he is "a success". He is not the kind of success he would like to be. He is not "well liked" as he wishes he was. When we compare his self-presentation to the facts of his career and his personality, we have to conclude that he is, in a way, a fraud.
He despairs, visibly, yet maintains that he is well-liked and he is a great salesman and father. The truth is he is none of these things.
Jay Gatsby, in The Great Gatsby, pursues a vision of success and becomes a criminal in order to achieve it. Regardless of the actual means of his success, Gatsby never seems to waver in his opinion of himself as an honest man, worthy of being loved. This is the same sort of conceit shown by Willie Loman.
If the American Dream is one of economic self-creation or self-determination, these men present a failed alternative. This is true, not because the dream is a failure or even leads to failure, but because some people who are given the opportunity to make themselves into heroes will gladly wear the clothes of the hero but are not morally strong enough to admit honestly that they were not quite good enough to be a hero.
It's not the failure of the dream, but the failure of the man who is driven by the dream, who falls short of the really good things the dream implies.