YouGParted didn't really create any partitionunallocated disk space. Instead the MBR got bogus by using GParted. Probably theThe CoreStorage LVG and all subsequent containers got corrupted also, because the whole stack wasn't resized as required. Usually - in macOS - the whole stack is resized with the command diskutil cs resizeStack ...
. As far as I can say from remote, the ending boundary of the second partition was simply moved to lower block numbers which usually works with normal HFS+ volumes in GParted but not in this case with a CoreStorage stack. Fortunately some invisible data structures of the CS stack weren't overwritten.
Additionally the recovery partition wasn't moved properly. But this a different problem.