WASHINGTON—President Donald Trump on Friday disputed his former Federal Bureau of Investigation director’s statements about their conversation regarding the agency’s probe of former National Security Adviser Mike Flynn, laying the groundwork for a potential legal clash that could have far-reaching consequences.

Speaking in the White House Rose Garden, a day after former FBI Director James Comey testified before the Senate Intelligence Committee that the president had urged him to ease off the agency’s probe of Mr. Flynn, Mr....