You have a couple of way to see your question.
Historically
Egypt is a civilization running from roughly 3000 BC up to 30 BC. Most of the mythology is dating back from the Old Kingdom (Especially the pyramid texts), and most of the literature was developed during the middle kingdom (What is known as classic Egyptian). That means that Egyptian mythology is in place in 1600 BC.
Greece is much more recent, as oldest tragedies are coming back from 800 BC (Homer and Hesiod). So there are no Greeks before 1000 BC.
That taken into account. the influence of the Greek mythology over the Egyptian mythology is inextistant.
In appearance.
In 500 BC the first great Empire, the Aechemenid (The Persian from the movie 300) invaded Egypt. Egypt more or then managed to keep a kind of independence up to 300 when Alexander the Great conquered the Aechemenid empire and thus gained dominion over Egypt (he founded Alexandria). At his death, one of his general, Ptolemy, became Pharaoh. And thus the last dynasty of Egypt is Greek (known as either Lagid of Ptolemy; yes Cleopatra VII is both a Greek and a Ptolemy).
A point on Ptolemies: They did not speak Egyptian, at the exception of Ptolemy III and Cleopatra VII. But they tried to keep Egyptians with their religion, while incorporating Greek myth inside the Egyptian religion; A god like Serapis is a clear example, he is a kind of concentration of Osiris and Hades (his name in Egyptian is wsjr-hp, that is pronounced ousir-hep, knowing that 'o' in Greek is an article [like a or the], so the Greek reading would be "o serap", and so "o serapis" at the nominative case [the exact reading of wsjr and hp are 'unknwon', but Serapis give us clear clues]).
Let's summarize :
- During the Egyptian dominion, there are no Greek whatsoever. So there era no connections between Greeks gods and Egyptians gods, simply because there are not even any Greeks to be seen.
- During the late Egyptian time, Egyptian mythology will bend to accept Greek mythology, gods as Serapis or Hermanubis are witnesses of that due to the fact the local rulers are Greeks
- I omit to talk here about the Persian invasion, roughly because Persians, for what we know, tried to accommodate with local gods (one of the few writing made by the founder Cyrus the Great is an invocation of the Babylonian god Marduk...). So Persians on their big conquests did not bring their own god (Ahura Mazda)
Greek god fleeing
The episode you are referring to is the fight between Typhon and Zeus. In the first instance we have (Hesiod) gods are not cowarding to Egypt, but later traditions have that:
Pseudo-Appolorus (dating 100 AD): When the gods saw him rushing toward the sky, they headed for Egypt to escape him, and as he pursued them they changed themselves into animal shapes.
Pseudo-hyginius (100 AC at best): Egyptian priests and some poets say that once when many gods had assembled in Egypt, suddenly Typhon, an exceedingly fierce monster and deadly enemy of the gods, came to that place. Terrified by him, they changed their shapes into other forms: Mercurius [Hermes] became an ibis [Toth], Apollo [Apollon], the bird that is called Thracian, Diana [Artemis], a cat [Bastet]. For this reason they say the Egyptians do not permit these creatures to be injured, because they are called representations of gods. At this same time, they say, Pan cast himself into the river, making the lower part of his body a fish [Onuris], and the rest a goat [Osiris], and thus escaped from Typhon
Antoninus Liberalis (100 AD, this is where you have all the details): Typhon felt an urge to usurp the rule of Zeus and not one of the gods could withstand him as he attacked. In panic they fled to Egypt, all except Athena and Zeus, who alone were left. Typhon hunted after them, on their track. When they fled they had changed themselves in anticipation into animal forms.
Apollon became a hawk [Horus], Hermes an ibis [Thoth], Ares became a fish, the lepidotus [Onuris], Artemis a cat [Bastet], Dionysos took the shape of a goat [Osiris], Herakles a fawn, Hephaistos an ox [Ptah], and Leto a shrew mouse [Wadjet]. The rest of the gods each took on what transformations they could.
This is important because as you can see this is from a late tradition, in fact post-Ptolemaic (which ended in 30 BC). In fact, those are ROMAN traditions, considering they are written in Greek but during Roman time (as for example Plutarque wrote in Greek bu is definitely a Roman, in his parallel lives Roman always are outperforming their Greek equivalents).
And that answer your question:
- Does the Greek gods fled in Egypt and transformed there into animal: yes, according to the Greek myth of Roman time, during which Egypt is a Roman province. notice who became what is changing from author to author.
- Are they the origin of the Egyptian gods: Egyptians gods by themselves are way older than any Greek gods, so no. But according to those authors, this could be more or less true, and the origin of Egyptians custom could come from those event
- How did the Greek gods change after becoming Egyptian gods: Our authors are silent on that
- Is there any relationship between Greek gods and Egyptian gods? Yes during Ptolemaic time this is clearly the case