My Brother's Wife
(La Mujer de mi hermano)
(2005)

Zoe (Bárbara Mori) becomes pregnant from her affair with her brother-in-law, Gonzalo (Manolo Cardona).  However, Gonzalo lets her know that he doesn't want anything to do with her or the baby, and walks out on her forever.  Also, we are shown the true reason of the eternal animosity between the two brothers:  it turns out that Ignacio (Christian Meier) -Zoe's husband-, the older of the two, was actually homosexual, and molested Ignacio as a child.

Eventually, Ignacio lets Zoe know that he heard her conversation with Ignacio about her pregnancy, and that he is willing to be the baby's father, but not before confessing his homosexuality to her.  She accepts it, and they stay together and raise the baby after the birth.
 

Thanks Dr Mat!