How does Kafka manage to achieve such a bizarre, dreamlike effect with dry and factual prose?
Kafka presents the reader with situations that are abnormal but often not quite fantastic. Even when the scenario is one that includes fantastic elements, as in "The Metamorphosis", Kafka does not present the "unreal" as unreal. Rather he presents it in a matter-of-fact manner. In dreams we encounter many impossible or incongruous episodes yet accept them as part of the nature of the dream - part of the "reality" of the dream.
In his opposition to naturalism and realistic narrative, Kafka developed a style which afforded his readers the experience of witnessing events as they would be witnessed in dreams; sometimes fantastic, such as Gregor Samsa’s experiences as an insect, often irrational, such as the episodes recounted in The Trial and The Castle, the events retain the realistic effect of a dream upon a dreamer.
As Gregor's transformation is not given a comment regarding the its "reality", his situation is accepted in the story, not only as real, but also as almost "hum-drum". This is a result of tone. Gregor's turmoil and human suffering are rendered fully in the text of "The Metamorphosis" while the transformation is effectively taken for granted.
This is not the logic of science-fiction, which would strive to explain the mechanism, the cause, and/or the reason for Gregor's transformation. Instead, this is the logic of dreams relayed in the tone of straight-forward, personal journal reporting, so to speak.
Using a subdued and overtly civilized/rational tone, Kafka is able to present material that is simultaneously dream-like and normal.