Gotland got is name from an ancient saga which indeed locates the origin of the Germanic tribe of the Goths there. The story goes that they left the island to land in what is now Poland and spread throughout Europe.
However, this is impossible to verify historically or archaeologically. The Goths first appear in historical records in 238 CE when they devastated Roman provinces south of the Danube. Before that, there is some mention of tribes such as the Gutoni and the Getae in southeastern Europe, but it is not clear if they are related.
In the 4th century, the Goths split into two main groups: The Ostrogoths and the Visigoths. The Ostrogoths migrated to the east in modern-day Ukraine, but were then pushed back westwards by the invading Huns, conquered Italy and destroyed the West Roman Empire in the mid-5th century. This Italian Ostrogoth empire had its capital in Ravenna and lasted until the Byzantines invaded in the mid-6th century.
The Visigoths migrated down to Gaul where they founded an empire with its capital in Toulouse; but then were forced further westward by other migrating tribes into Spain. Here, they founded a new Visigoth empire based in Toledo in 507 that lasted until the Muslim Arabs invaded Spain in 711.