Welsh and UK ministers have been rowing since March over how to finance the commuter lines in and out of Cardiff.
Mr Crabb said the scheme - estimated at Â£309m to Â£463m - was "probably the most knotty" problem between the two governments but was soluble.
The valleys rail electrification is due to be completed between 2019 and 2024.
Planned rail improvements will see the upgrade of the main line from London Paddington to Cardiff, which is due to be completed by 2017, and extended to Swansea by 2018 at a cost of Â£850m.
The electrification of the Valleys lines was due to follow, but the plan was thrown into doubt in March by a row over the financing of the project.
Speaking on Radio Wales' Sunday Supplement programme, Mr Crabb said rail electrification was the "number one issue" for him.
He said: "It's something that I've been spending quite a bit of my summer working on.
"There's a bit more work to be done between the two governments on where we think the solution lies, but I think when I go around talking to businesses in south Wales they are desperate to see this problem answered, they want the two governments to be working effectively together."
Describing the issue as "a bit of a litmus test" for joint working between Wales and Westminster, he warned the issue "can't drag on indefinitely".
"There are engineering teams involved in Network Rail who need to get tasks assigned to them if this huge, enormous, financially-challenging project is to go ahead," he said.
"There are some quite hard deadlines in that. But we are talking a short number of months hopefully."
A deal on who will pay to electrify the valleys rail network should be ready in a "short number of months," says Welsh Secretary Stephen Crabb.