A concentration gradient is established when there is a difference in the concentration of a solute in two regions. This can be achieved through various methods such as diffusion, osmosis, or active transport. In nanotechnology, gradients can be precisely controlled using microfluidic devices or by applying external fields.