This paper proposes a finite-difference (FD)-based method for the design of gradient coils in MRI. The design method first uses the FD approximation to describe the continuous current density of the coil space and then employs the stream function method to extract the coil patterns. During the numerical implementation, a linear equation is constructed and solved using a regularization scheme. The algorithm details have been exemplified through biplanar and cylindrical gradient coil design examples. The design method can be applied to unusual coil designs such as ultrashort or dedicated gradient coils. The proposed gradient coil design scheme can be integrated into a FD-based electromagnetic framework, which can then provide a unified computational framework for gradient and RF design and patient-field interactions.