George and Gracie were a pair of Humpback whales that wandered into San Francisco Bay as calves, and were brought to the Cetacean Institute in Sausalito. By 1986, they had become fully grown, each weighing 45,000 pounds. However, that year it was decided that they had to be released back into the wild because the Institute no longer had the money to feed them their two-ton requirement of shrimp per day.
George and Gracie came to the attention and interest of Admiral Kirk who had time traveled to 1986 in search for some of these whales. In the 23rd century the powerful signal from a deep space probe has caused disruption of Earth's weather patterns, threatening the entire planet. An alien species had sent the probe to Earth to determine why they lost contact with humpback whales (which had become extinct in the 21st century).
Upon visiting the Institute, Kirk and Spock determined that they were ideal specimens for their mission. Spock mind melded with the whales to communicate their intentions of taking them back to the 23rd century, wanting to avoid making the same kind of arrogant assumption that those who had hunted the whales to extinction originally had made. In doing so, he learned that the whales were unhappy with the way their species had been treated by man, although they were apparently willing to help the time-travellers. He also learned that Gracie was pregnant. Dr. Gillian Taylor noticed his melding after a visitor pointed him out and was initially angry with Spock, but eventually believed Kirk's explanation.
With Taylor's assistance, Kirk and his crew were able to locate the whales after they were released; although they were targeted by whalers, the crew was able to beam them into a specially designed tank aboard their commandeered Klingon vessel.
After returning with Kirk to the 23rd century, George and Gracie were released into San Francisco Bay, amid the chaotic weather caused by the Whale Probe. George communicated with the probe via the sounds made by the male of his species and the probe replied. Following a brief conversation, the probe ceased its disruptive signal and turned away from Earth, heading out into space.
The pair were last seen heading to open water. (Star Trek IV: The Voyage Home)