We present atomic resolution Z-contrast images, electron energy loss spectroscopy (EELS) and theoretical calculations in support of a band-bending model for the effect of grain boundaries on critical currents. In the high angle regime, dislocation cores are closely spaced and the boundary is modeled as a continuous junction, with a width determined by the dislocation density per unit boundary length. This quantitatively explains the approximately exponential reduction in critical current. In the low angle regime, where dislocations are separated by substantial good passages, explicit calculations of flux pinning are presented. Significant differences are found between a strain and band-bending mechanism. Recent data fit the band-bending model and suggest substantial improvement is possible through doping to a flat band condition.