Starships in Star Trek frequently encountered magnetic storms  that could sweep them off course or even damage them. An ion storm (also called an ionic storm or ionic front) is a type of magnetic storm which contains ionically charged particles, traveling at thousands of kilometers an hour. In the episode "Where No Man Has Gone Before" of the original series, an encounter with a magnetic storm swept the SS Valiant into the galactic barrier.  In "Mirror, Mirror",  interference caused by transporting through an ion storm storm caused the crew to transport to an alternate mirror universe.  In the Voyager episode "Resistance", the USS Voyager hid within a large magnetic storm over the Mokra homeworld's northern magnetic pole to avoid the Mokra's phased ion cannons. 

Such storms appear to be similar to the real-life phenomena of geomagnetic storms. A geomagnetic storm is a temporary disturbance of the Earth's magnetosphere caused by a disturbance in space weather. Associated with solar coronal mass ejections, coronal holes, or solar flares, a geomagnetic storm is caused by a solar wind shock wave which typically strikes the Earth's magnetic field and changes the electric currents in the ionosphere, causing the phenomena known as the Northern Lights or Aurora Borealis.
Magnetic storms usually last 24 to 48 hours, but some may last for many days.

The largest recorded geomagnetic storm occurred in 1859, when telegraph wires in both the United States and Europe shorted out, some even causing fires. Auroras were seen as far south as Hawaii, Mexico, Cuba, and Italy—phenomena that are usually only seen near the poles.  On 13 March 1989 a severe geomagnetic storm caused the collapse of the Hydro-Québec power grid in a matter of seconds as equipment protection relays tripped in a cascading sequence of events. Six million people were left without power for nine hours, with significant economic loss. The storm even caused auroras as far south as Texas. In August that same year, another storm affected microcomputer chips, leading to a halt of all trading on Toronto's stock market.


 








An ion storm encountered in Star Trek: Voyager





Geomagnetic storms power the auroras found near the Earth's poles