What does the phrase “in the lap (or on the knees) of the gods” mean and Where does it originate?

The phrase “in the lap of the gods” means: According to the will of the gods; in the hands of fate or Providence; beyond one’s control.

The origin is Greek; the earliest occurrence is found in Homer’s Iliad, Book XVII, line 514.

The speaker was Automedon, and the occasion was the fight over the body of the slain Patroclos, friend and companion of Achilles.

The Trojans, led by Hector, had already stripped the body of its armor, armor lent by Achilles to Patroclos, and, to disgrace the Acheans further, sought to drag the corpse away, intending to cut off the head, carry it in triumph into the city, and throw the body to the dogs.

It was at this juncture that Automedon, watching the ebb and flow of battle, said, “All is in the lap of the gods,” or, as some translate it, “on the knees of the gods.”

But the threat of disgrace did serve, however, to bring about a reconciliation between the powerful Achilles and Agamemnon, leader of the Acheans, and to induce Achilles to re-enter the war, eventually to rout the Trojans and slay his arch-enemy, Hector.