A barium swallow is a diagnostic imaging procedure used to visualize the upper gastrointestinal (GI) tract, including the esophagus, stomach, and the first part of the small intestine. The procedure involves swallowing a contrast liquid containing barium sulfate, which coats the lining of the upper GI tract, making it visible on X-ray images.