
gelegentlich
occasionally
Sometimes, but not regularly; from time to time.
Wir gehen gelegentlich zusammen ins Kino, aber nicht jede Woche.
We occasionally go to the movies together, but not every week.
occasionally
Loading your saved state.

occasionally
Sometimes, but not regularly; from time to time.
Wir gehen gelegentlich zusammen ins Kino, aber nicht jede Woche.
We occasionally go to the movies together, but not every week.

on the occasion of
Happening because of a specific event or on a specific occasion. This use is rather formal.
Gelegentlich seines 80. Geburtstages wurde ein großes Fest veranstaltet.
On the occasion of his 80th birthday, a large celebration was held.
The word 'gelegentlich' (occasionally) is derived from 'die Gelegenheit' (opportunity/occasion). So it describes something that happens when a suitable opportunity arises, and not according to a fixed plan.
Wenn sich eine Gelegenheit ergibt, besuche ich meine alte Heimatstadt.
When an opportunity arises, I visit my old hometown.
In the meaning 'manchmal' (sometimes), 'gelegentlich' (occasionally) is flexible. It can stand at the beginning of the sentence to emphasize frequency, or in the middle of the sentence.
Gelegentlich gehe ich nach der Arbeit spazieren.
Occasionally, I go for a walk after work.
In the formal meaning 'anlässlich' (on the occasion of), 'gelegentlich' (on the occasion of) takes the genitive. This structure is found almost only in written language, for example in official speeches or reports.
Gelegentlich des Firmenjubiläums wurde eine Feier für alle Mitarbeiter organisiert.
On the occasion of the company anniversary, a celebration was organized for all employees.
You can recognize the meaning 'anlässlich' (on the occasion of) by the fact that 'gelegentlich' (on the occasion of) stands directly before a noun in the genitive that names a specific event. The more common meaning 'manchmal' (sometimes), by contrast, refers to the frequency of an action.
Gelegentlich seiner Reise nach Berlin besuchte er auch das Brandenburger Tor.
On the occasion of his trip to Berlin, he also visited the Brandenburg Gate.
sometimes
Both words describe something that happens from time to time, but not regularly. „Manchmal“ is neutral and especially common in everyday speech. „Gelegentlich“ often sounds somewhat more formal and can suggest a lower frequency. In conversation, „manchmal“ is usually the better choice; „gelegentlich“ also works in more formal texts.

Ich fahre gelegentlich mit dem Fahrrad zur Arbeit.
I occasionally ride my bike to work.
Ich fahre manchmal mit dem Fahrrad zur Arbeit.
Sometimes I ride my bike to work.