Senior ministers backed the deal, which would see Mr Kabila stay on until elections are held by the end of 2017.
The country has faced a crisis since Mr Kabila failed to step down earlier in December,
when his mandate expired.
Elections should have been held in November, and dozens of people have died in protests since then.
After the electoral commission cancelled the scheduled vote, citing logistical and financial difficulties in organising them, Mr Kabila formed a 74-member transitional government and said elections would be held in 2018.
Representatives of Mr Kabila and his long standing rival Etienne Tshisekedi have been locked in negotiations brokered by Catholic Church leaders since 8 December.
Neither man has yet signed the final deal, but representatives of both sides said the two men would put their names to the transition agreement later.
In the meantime, members of the government and the opposition signed it in the final minutes of 2016.
“Today, we are happy to head up a political compromise,” said Archbishop Marcel Utembi, who heads the church body which mediated the talks.
Under the deal, Mr Kabila is to lead a transitional government until elections which must be held by the end of 2017.
During that period, an opposition politician will serve as prime minister.
The document states that Mr Kabila will not seek a third term. The constitution bars him from doing this, but the opposition had feared he might try to amend it to enable him to do.
Archbishop Marcel Utembi sees further challenges ahead.
“It’s one thing to have a political compromise but putting it into place is another,” he said, after the signing ceremony on Saturday.
DR Congo has not had a smooth transfer of power between any leaders since independence from Belgium in 1960.
Mr Kabila took over in 2001 following the assassination of his father Laurent Kabila.