"This was an appropriate outcome which addresses all the public safety concerns of drinking and driving," Deputy District Attorney Gina Satriano said.
The actor's attorney entered the plea on his behalf before Malibu Superior Court Judge Lawrence Mira, said Satriano. Gibson did not appear in court.
Gibson's arrest on July 28 shocked the world with his alleged anti-Jewish slurs in a drunken state.
Gibson, 50, had been set to face the judge on September 28 in the Malibu, California courtroom.
He was arrested on July 28, allegedly driving while drunk and allegedly with an open bottle of tequila in his car.
The TMZ.com celebrity website released a police report, in which the devout Roman Catholic director of the blockbuster "The Passion of the Christ" referred to "f...ing Jews" after his car was pulled over last Friday.
"The Jews are responsible for all the wars in the world," he was quoted as saying in the report after first asking the arresting police officer: "Are you a Jew?"
USD 1,300-dollar fine
Gibson, who won best film and best director Oscars for "Braveheart," checked into a detoxification program on Monday and apologized to the Jewish community.
His "The Passion of the Christ" stirred a heated debate in the United States and abroad, for its alleged anti-Semitism and excessive violence.
Gibson was charged with driving under the influence and driving with a .08 or higher blood-alcohol content. The Oscar winner was also charged for allegedly having an open bottle of tequila in his car.
Judge Mira ordered the actor to attend Alcoholics Anonymous meetings five times a week for four and a half months and then three AA meetings per week for seven and a half more months.
He also ordered Gibson to enroll in an alcohol abuse program for three months.
In addition, Gibson was fined a total of 1,300 dollars and his license was restricted for 90 days. In exchange for his plea, the two remaining charges were dismissed.
Gibson volunteered to perform in a public service announcement on the problems of drinking and driving, Satriano said, and he volunteered to immediately enter into rehabilitation.