The invention discloses a coating device and a coating method. The coating device comprises a needle head, a clamp, an imaging device, a height measurement device and a control device, wherein paint is sprayed on the needle head, the clamp is positioned under the needle head, and the clamp and the needle head can relatively move in a transverse direction and a longitudinal direction; the imaging device, the height measurement device and the control device are positioned above the clamp; the needle head can vertically move relative to the clamp; the needle head is connected with a flow control device, and the imaging device, the height measurement device and the flow control device are connected with the control device. During coating, the injection quantity of the paint of the needle head and the opening and closing of a valve are controlled through the flow control device. In the injection process, the control device controls the relative positions of the clamp and the needle head in the transverse direction and the longitudinal direction so as to ensure that the needle head carries out point injection according to a point injection track determined in advance, and controls the needle head to vertically move relative to the clamp so as to ensure that the distance between the needle head and the surface of a product to be coated is constant.