It's a significant part of the cost. One of the reasons you want to electrify is to get the performance that will give you the good trip times and attract the ridership. Any technology that's not electrified ends up being significantly heavier. There's more weight involved. Weight is the enemy of speed. A heavy vehicle can't go quite as fast.
It gets a little bit more complicated than that. Weight combined with speed contributes to track damage, which raises the operating costs of your system. The combination of these factors has a snowball effect on economic feasibility.