The 41-year-old admits she was hesitant to leave her children at home but Affleck, 41, convinced her that it was the right choice, reports contactmusic.com.
"At the end of (TV show) 'Alias' I had my first child and so I've worked less with each baby and this movie I wasn't sure that I wanted to do it. I'm comfortable at home. I like being at home," she told Good Morning America.
"My husband, Ben, really encouraged me to do it. He really said, 'It's time,'" she added. Garner plays a doctor in the film about a drug addict who contracts HIV.
"Dallas Buyers Club" also features Matthew McConaughey and Jared Leto.