Okey, first reboot the computer. This solves some problems even though it seems unlikely in this case.
After finishing the reboot, open GParted and try to see if the drive (and the volume contained within) are visible.
Now, select your drive in GParted, and choose the partition that should appear. Right-click on that partition and go to the "Format To..." option. From there, select the type of filesystem that you'd like to format the drive to. I'd recommend you use
FAT32, but the choice is yours. Then, click the Confirm button in the top menu.
After some time, your drive should have successfully formatted and you will be able to see the volume mount on Ubuntu.
If you want to avoid data loss, try to see if the drive is recognizable from another machine. If it is, copy any data over that you'd like to save and format from that machine.
Command Line Method
First try to see your volumes by writing
This will show your volumes. When you see /dev/sdb (and its partition sdb1), run the following commands to format your drive
mkfs.vfat -n 'pendrive-name' -I /dev/sdb1
After that you may eject the drive with
sudo eject /dev/sdb
Then, unplug and replug the device. Ubuntu should detect the drive and allow you to mount it.