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.
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.
Witnesses said a fight erupted in the camp and a man, who may have been drunk, started shooting when police turned up to investigate.
Also Read
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".
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.