auxiliary verb
Continuative form of ごとし, used in formal or literary contexts to mean 'like' or 'as'. Often appears in set phrases or classical-style expressions.
See also: 如し
風のごとく去っていった。
He left like the wind.
彼は神のごとく崇められた。
He was worshipped as a god.
He appeared and left like a storm.
彼は何事もなかったかのごとく振る舞った。
He acted as if nothing had happened.
如し is the classical predicate form that ends a clause ('is like ~'), while 如く is the adverbial form used before a verb ('like ~, [verb]').
Classical Japanese auxiliary verb ごとし, from Old Japanese. The continuative form ごとく survives in modern literary and formal registers.