You have to add each photo in the post description separated by new lines.
So for example for official web UI:
Title: <You can put here whatever you want>
URL: Leave empty
Image: Leave empty
Body: Put images like this:
[](<image_url1>)
[](<image_url2>)
Etc...
You can put image one by one by clicking image icon in formatting options in the body. You will be prompted to select an image and then it will be uploaded and converted to URL.
There is a small caveat though. Not every client will convert this to gallery since Lemmy doesn't officially support something like that.
(That's why I added [Gallery] in the title so people with different clients would know they just have to open description.)
There is a currently an open issue on GitHub that asks to implement this but it doesn't gain much of the traction.