WASHINGTON—Donald Trump has picked a fight with the Central Intelligence Agency over Russian computer hacking of American elections, an unprecedented move for an incoming president.

Mr. Trump attacked the CIA’s credibility following a report that agency officials recently told a group of senators that the Russian-led theft of emails from the Democratic National Committee and Hillary Clinton’s campaign staff were intended to help Mr. Trump win the race for the White House.

U.S. intelligence officials, the Federal Bureau of Investigation and the Department of Homeland Security have investigated the cyberattack for months, issuing an unusual statement in October that blamed Russia for the hacking, which they said then was aimed at interfering with American elections.

But analysis of the hacking has continued since then and, in light of new information, the CIA has amended its view, determining that the Russian government had hoped to boost Mr. Trump’s campaign and diminish his rival, Mrs. Clinton. Two U.S. officials confirmed the CIA expressed that view in briefings to senators earlier this month. The CIA’s view was first reported Friday by the Washington Post.

Mr. Trump’s transition team issued a statement within hours of the report, deriding the CIA and saying the election “ended a long time ago” and it was time to move on.