The Flash, specifically Barry Allen, got his powers from a scientific accident where a lightning bolt struck his lab, causing a mixture of chemicals to splash onto his body. This incident altered his DNA and physiology, granting him superhuman speed, reflexes, and other abilities connected to an energy source called the Speed Force. The Speed Force is a cosmic dimension that provides him with his incredible powers like running faster than the eye can see, vibrating through objects, time travel, and generating lightning. Barry's powers also include enhanced metabolism, durability, and healing abilities, all stemming from his connection to the Speed Force acquired in that accident.