The prime minister made the incendiary remark in an interview with Piers Morgan on TalkTV.
He condemned the Labour leader for once representing the Islamist group Hizb ut-Tahrir - which has now been proscribed as a terrorist organisation in the UK - when he was a lawyer.
Sunak said: “He supported them in resisting proscription elsewhere. That’s who he was on the side of. We’re busiy trying to ban these people and he was busy trying to represent them.”
Morgan asked him: “Do you think he’s a terrorist sympathiser?”
The prime minister replied: “The facts speak for themselves. There he was, he was their lawyer when they were trying to resist this, we’ve just proscribed them because we think that’s what they are. These things speak to people’s values.”
But a spokesman for Starmer described the PM’s remarks as “desperate nonsense”.
He added: “Keir Starmer oversaw the first ever prosecution of senior members of Al-Qaeda, the jailing of the airline liquid bomb plotters and the deportation of countless terrorists.
“With Keir’s leadership, charge and conviction rates for sexual offences rose, victims were better supported, and the CPS was reformed. The Prime Minister can only dream of having such a record of serving his country.”
Sunak has also been criticised for shaking hands with Morgan on a £1,000 bet that he will be able to deport people to Rwanda before the general election.