Interesting that the volume is now name "Time Machine" (before doing an Erase on it) even though the previous Erase (with the drive selected in sidebar) was not successful. Before that, it was named "Untitled."
It seems Disk Utility its not able to write data to a critical part of the drive's media. Since this problem was present when you used this drive with your older Mac, it may be hardware problem on the hard drive. The drive appears to get passed setting up the partition scheme (with one volume/partition), but fails while formatting the volume.
With the drive selected in sidebar, are you able to click on Partition, instead of Erase? If you can show the Partition setup pane, try creating two partitions (volumes) on the drive. If you can, make the first partition smaller and the second partition (the one just added) larger. Apply the new partition scheme. Does it still error out? Do you end up with two corrupted volumes that are not mountable?
Some the other things, if you have not already... Try using a different USB cable, to rule out faulty cable as the cause. Make sure it is rated for the speed of the drive. So, if the drive is USB 3.0, the cable needs to be rated for USB 3.0. If the drive is USB 2.0, don't use an old USB 1.1 cable. If you're using a USB hub, try a direct connection to the Mac's USB port. Try more than one USB port on the Mac. It's also possible for the hard drive mechanism to be OK, and the enclosure to be faulty. If you can't get it working, you may want to test the hard drive mechanism in a different enclose, or get a USB adapter like this one
http://eshop.macsales.com/item/NewerTech/U3NVSPATA/