Grain boundaries in YBa2Cu3O7-x superconductor thin films grown on (001) MgO by metal-organic chemical vapor deposition (MOCVD) have been characterized using transfftission electron microscopy (TEM) and high-resolution electron microscopy (HREM). It was found that the YBa2Cu3O7-x thin films were highly textured with the c axes, or [001] orientation, nearly parallel between grains and perpendicular to the MgO substrate. A majority of the grain boundaries are low-angle boundaries with a tilt angle, theta, less than 15-degrees. The low-angle boundaries appear to be strongly faceted on an atomic scale in such a way that the boundary planes tend to be parallel to the (100), (010), or (110) lattice planes in one of the adjacent grains. Almost all of the lattice planes, except for a number of distorted regions along the boundaries, are continuous across the boundaries from one grain to another, accommodating the misorientation with a slight bending of the lattice planes. The small-angle boundaries are shown to consist of affays of dislocations. A domain structure formed by the interchange of a and b axes has been observed in large grains. The domain boundaries are strongly faceted with the (100) and (010) lattice planes parallel to the boundaries. These observations on the atomic structure of boundaries are used to discuss the effect of grain boundaries on superconductor properties in YBa2Cu3O7-x thin films.