Andersen and Gibson combined last season to win the Jennings Trophy for the Ducks, who finished with the NHL's lowest goals-against average.
Bernier returns to Southern California after starting his NHL career with the Los Angeles Kings, who drafted him in the first round in 2006. He won a Stanley Cup ring in 2012 as Jonathan Quick's backup before getting traded to Toronto in 2013.
The four-time defending Pacific Division champion Ducks broke up their award-winning goalie tandem when they couldn't reach a long-term contract agreement with Andersen, who got a five-year, $25 million deal from Toronto after the move.
Bernier has a hefty cap hit of $4.1 million for the upcoming season, but the Ducks will pay only $2.1 million because the goalie already received a $2 million signing bonus.
After an 0-8-1 start to last season, Bernier went 12-21-3 with a 2.88 goals-against average for the Maple Leafs, who finished with the NHL's worst record. Toronto likely will have Andersen and youngster Garret Sparks in net.
Bernier made his NHL debut against the Ducks in September 2007, getting a win for the Kings in a game played in London.