http://gparted-forum.surf4.info/viewtopic.php?id=17446
This is because of the restriction on Gnome Wayland to prevent other users from opening a window. To avoid the failure, just execute
xhost +local:
to admit all local users to have access to the display. I added an alias in .bashrc as:
alias gparted = "xhost +local: ; sudo gparted"