Yea, that's the major factor. Staying home to take care of babies not only holds up your pay scale, but takes you off the track for more competitive positions very quickly. Women find it very difficult to jump back in on their previous career trajectory when they do return. It's to be avoided at all costs if you're an ambitious women.
Ideally, people having kids wouldn't cause the wage gap to grow. But the push for women to downshift is really brutal, and most of it comes from other women (mother in laws and sanctimommies).