We study dislocation networks in the plane using the vectorial phase-field model introduced by Ortiz and coworkers, in the limit of small lattice spacing. We show that, in a scaling regime where the total length of the dislocations is large, the phase field model reduces to a simpler model of the strain-gradient type. The limiting model contains a term describing the three-dimensional elastic energy and a strain-gradient term describing the energy of the geometrically necessary dislocations, characterized by the tangential gradient of the slip. The energy density appearing in the strain-gradient term is determined by the solution of a cell problem, which depends on the line tension energy of dislocations. In the case of cubic crystals with isotropic elasticity our model shows that complex microstructures may form, in which dislocations with different Burgers vector and orientation react with each other to reduce the total self energy.