Carroll then sued Trump in state court in NY a year ago for defamation, contending he harmed her reputation with his counter-claims.
Kaplan bluntly dismissed the Justice Department's contention that responding to the allegation was part of Trump's official duties as president.
According to Judge Lewis Kaplan, Trump must remain a defendant in the lawsuit and can not be replaced by the United States government.
The judge ruled that a law protecting federal employees from being sued individually for things they do within the scope of their employment did not apply to a president.
The Washington Post obtained Kaplan's 59-page ruling, which said Trump didn't qualify as a federal "employee" and that he wasn't acting "within the scope of his employment" when he denied Carroll's rape allegation during 2019 interviews.
Trump has denied the allegation, saying in a June 2019 interview that he had never met Carroll and she was "not my type". "And no one had the ability to control him".
Ms Carroll, a former advice columnist for Elle magazine, said in her lawsuit that in the autumn of 1995 or the spring of 1996 she and Mr Trump met in a chance encounter when they recognised each other at the Bergdorf Goodman store.
"The simple truth is that President Trump defamed our client because she was courageous enough to reveal that he had sexually assaulted her, and that brutal, personal attack can not be attributed to the Office of the President", she said in a statement. I am happy that Judge Kaplan recognized these basic truths.
The Justice Department intervened in Carroll's case, which was first filed in state court, in September.
Carroll's lawyer, Roberta Kaplan, said Tuesday: "The simple truth is that President Trump defamed our client because she was courageous enough to reveal that he had sexually assaulted her, and that brutal, personal attack can not be attributed to the Office of the President".
The ruling by Judge Lewis Kaplan means E. Jean Carroll's lawsuit against Trump - in his personal capacity as an ordinary citizen - can proceed.
The DOJ's intervention put that process on hold.
"While the government's position is not entirely without merit, it goes much too far. Judge Kaplan's words speak for themselves", she said.
"A comment about government action, public policy, or even an election is categorically different than a comment about an alleged sexual assault that took place roughly twenty years before the president took office", he wrote.