Gabrielle switched the babies because she felt that Michael would fall apart if he lost his child, as his wife had just died as well.
While the story wasn't as good as the baby switch with Karen, Jenny, and Katrina, it did have some strong performances from the actors involved, and a very dramatic series of aftershocks (which soaps don't do now), such as Gabrielle working at Wanda's and falling apart, Gabrielle being a pariah, and Gabrielle's trial, which had a classic moment where Megan ran out of the court when Max admitted he still loved Gabrielle. I also thought this story was good use of Brenda, who was a tough yet vulnerable heroine, which soaps always need. Unfortunately her story after this, the one where Michael Grande was drugging her, seems atrocious.
Badderly was named worst story of the year by SOD - I guess part of that colors my thinking. But I should check it out.