There are several aspects why Die Verwandlung is based on the life of Franz Kafka.
Kafka wrote the book during the period he was depressed and he had sleeping disorders, which means he couldn't function very well in daily life. Gregor Samsa also can't function because of his metamorphosis.
Kafka had a good relation with his sister and a bad relation with his father. Samsa also had a bad relation with his father after he was transformed and Samsa's sister takes care of him.
The name Samsa has the same structure as Kafka.
Kafka is form a salesmen family, Samsa is a salesman.