'Prayer' shares its root with 'precarious' — originally 'obtained only by prayer,' hence insecure.
A solemn request for help or expression of thanks addressed to God or another deity; the act of praying.
From Middle English 'preiere,' from Old French 'preiere' (prayer, request), from Medieval Latin 'precāria' (a petition, obtained by entreaty), from Latin 'precārius' (obtained by prayer or entreaty), from 'precārī' (to ask, to beg, to pray), from 'prex' (prayer, request, entreaty), from PIE *preḱ- (to ask, to entreat, to request). The same root gave us 'precarious' — originally 'dependent on the favor of another,' obtained only by prayer, hence uncertain and insecure. Key roots: *preḱ- (Proto-Indo-European: "to ask, to entreat, to request"), prex (Latin: "prayer, request, entreaty").
'Precarious' literally means 'obtained only by prayer' — from Latin 'precārius' (dependent on entreaty). Something precarious was originally something you held only because someone else had granted your prayer; it could be revoked at any time. The sense shifted from 'held at another's pleasure' to 'uncertain and dangerous' — because depending entirely on someone else's goodwill is inherently insecure.