The settlement is intended to end the bickering and accusations that have permeated the case handled in mostly secret proceedings for more than a year, Superior Court Judge Peter Lichtman said.
Gibson's payments to Russian musician Oksana Grigorieva are dependent on a lasting truce.
As part of the agreement, their daughter will receive support equal to what the actor-director provides his other seven children. The former couple will split custody of the girl, who turns 2 in late October.
In addition, Gibson will keep paying for a multimillion house he purchased for Grigorieva and their daughter. The house will be sold when the girl turns 18 and she will receive the proceeds.
As a result of the settlement, Grigorieva cannot pursue a civil case against the Oscar winner, and both sides were ordered not to speak or write about their relationship.
Lichtman specifically said neither side could release any audio recordings, an apparent reference to a series of racist and sexist rants by Gibson that were leaked to the celebrity website RadarOnline.com.
Grigorieva's payments were divided into thirds, with the final payment occurring in 2016 if the agreement is not breached.
Gibson spoke a handful of times during the hearing, mainly to acknowledge he understood terms of the settlement.
"I'd like to say thanks your honor for bringing this matter to a reasonable conclusion," the "Braveheart" star said.
Grigorieva also thanked the judge and said she hoped the resolution meant Gibson's career could resume.