GParted scans through all devices using libparted and third-party tools. It not only reads the partition table, it looks for many things such as for file systems, labels, UUIDs, whether the partition is in use, where the partition is mounted or active, how much free space is available within the file system and within the partition, is the file system encrypted, and is the partition part of a Logical Volume Manager and if so the volume group details.
Tools like fdisk or gdisk read the partition table.
Parted reads the partition table and tries to determine the type of file system.
For exact commands/arguments/parameters used by GParted I suggest reading the source code starting with GParted_Core::set_devices_thread because this is where scanning of device and partition information begins.