Judge Richard Leon of the US District Court for the District of Columbia ruled the deal could go ahead - over a year after it was first announced.
Government lawyers had argued that the takeover would hurt innovation and allow AT&T to charge rival providers more for its must-have content - costs that would ultimately be passed on to consumers.
Time Warner owns CNN, HBO, home to Game of Thrones and Veep, and Warner Brothers, whose franchises included Batman, the Lego movies and Harry Potter.
Judge Leon also said it would be "unjust" for the Justice Department to seek to put a hold on the deal pending an appeal.
Democrats on Capitol Hill have raised questions about the Justice Department's motivations and the White House's influence in deciding to take the case to court. Of course, that was prior to the court's ruling on the AT&T and Time Warner merger today.
In making that ruling, Leon reaffirmed the judiciary's traditional tolerance for "vertical integration" - the technical term for mergers between companies that operate related, but distinct, businesses. The Justice Department even sued to block it, but Judge Leon saw things a bit differently. With that added revenue, it could eventually lower the cost of its subscription services, the company argues.
The decision on a so-called "vertical integration" - between two companies who do not make competing products - could have a profound impact on future mergers.
The Justice Department rarely sues to block a "vertical merger" such as the AT&T and Time Warner because they are not considered as economically risky as "horizontal mergers" - or ones in which a companies buys direct competitors such as T-Mobile's pending deal for Sprint. In a statement, Delrahim said he was "disappointed" in the ruling but stopped short of saying his division would appeal, saying only that it would "consider next steps in light of our commitment to preserving competition".
AT&T and Time Warner announced their deal on October 22, 2016, in the midst of the bitterly contested presidential campaign between Donald Trump and Hillary Clinton.
The deal was hatched in August 2016 when Randall Stephenson, the chief executive of AT&T, called Jeff Bewkes, his counterpart at Time Warner.
Former Federal Communications Commission staff attorney Blair Levin said a loose interpretation of antitrust law would allow the government to block nearly any deal, and open up the process to political interference.
David McAtee, AT&T general counsel, said: "We are pleased that, after conducting a full and fair trial on the merits, the court has categorically rejected the government's lawsuit to block our merger with Time Warner".