Local mayor Mario Savarese said the gunman and the victims – reported to be two brothers aged five and 10, and an 84-year-old man – were from the same housing development in Ardea, where the tragedy unfolded.
The shooter holed up in a nearby apartment for three hours as negotiators tried to persuade him to come out.
Armed officers finally forced their way in and found his lifeless body, the Ansa news agency said.
He appeared to be shooting randomly when he hit the boys playing in a park.
The elderly man, who had been cycling past, reportedly confronted the killer as he was about to start shooting.
Alessio D’Amato, health commissioner for the local region of Lazio, confirmed the deaths of the children after they were taken to hospital.
“I have just received a telephone call I would never have wanted to have,” he said in a statement.
He added: “I am deeply shocked by what happened and express all my regret and my heartfelt condolences to the family and the entire Ardea community, which today is in terrible mourning for this tragedy.”
A lawyer representing the family said the father did not know the shooter.