Press a tiny button on the G5's edge and the bottom and battery easily separate from the phone.
Incidentally, several years ago Chinese manufacturer Jiayu made an iPhone-looking phone also called the G5 and having a dedicated button to release the back cover: