Three other people, including the gunman, were seriously wounded in the attack, which took place in the northern town of Roye, about 110 kilometres (68 miles) north of Paris.
Interior Minister Bernard Cazeneuve told reporters three people had been killed "in cold blood" including a six-month-old baby, a man and a woman at what French media are reporting to be a traveller camp.
(Police officers investigate at the traveller camp. Photo: Philippe Huguen/AFP)
A policeman who was badly wounded in the attack later died of his injuries, and a three-year-old child and another policemen were both said to be in serious condition.
The toddler went into cardiac arrest and has been put under ventilatory support, local authorities said.
(The town of Roye, north of Paris. Photo: GoogleMaps)
Witnesses said a fight erupted in the camp and a man, who may have been drunk, started shooting when police turned up to investigate.
The gunman was also said to be in serious condition, they said.
"This is a really tragic case," Cazeneuve told reporters, saying the family had been "decimated by the killer".
(A helicopter of Gendarmerie flies near a traveller camp, the site of a shooting which killed four people and seriously wounded three. Photo: Philippe Huguen/AFP)
President Francois Hollande and Prime Minister Manuel Valls expressed shock over the incident, sending their condolences to the families of the dead and wounded.
"My thoughts are with the families, with the victims and the policeman killed in the service of France," said Valls on Twitter.
In a statement released by his office, Hollande hailed the "courage and commitment" of the police officers who responded to the incident, extending condolences to the families of those killed and injured in the attack.