Edward bites Bella several times in this novel. The first time he bites her it is to remove the child from her womb. The sac around the baby is too thick to perform a c-section with traditional methods. The only way for Edward to save the baby and help Bella is to bite through the sac with his teeth.
The second time he bites her shortly follows the first. Bella is dieing and the only way to save her is to transform her into a vampire. Bella had already chosen to become like Edward. He had agreed to change her himself, but neither Edward nor Bella thought it would be such a necessity. Now that Bella has conceived a child, the only way to survive the birth is by changing as soon as the child is free from her. Edward must bite her immediately to save her life. Edward bites her repeatedly in an attempt to get enough venom into her blood to change her before her heart stops beating.