1. An X-ray imaging apparatus comprising: an X-ray generator configured to generate and radiate X-rays to a subject; an X-ray detector including a plurality of detection regions, wherein each of the detection regions includes at least one pixel region and configured to detect and convert X-rays transmitted through the subject into an image signal; and a controller configured to analyze the image signal of the subject to extract a noise region and a saturation region from the image signal and set gain of the X-ray detector for each of detection regions of the X-ray detector according to the extracted noise region and the saturation region.