Spoilers ahead

We've said before that "The Orville" is many things. It's certainly not a sci-fi drama like "The Expanse" nor a sci-fi comedy, like "Red Dwarf," but it's a show that contains elements of both. At the same time, the show isn't afraid to shock us, make us laugh, or make us think, and, possibly most important of all, it doesn't take itself too seriously. Add all that up and it makes for compelling viewing, especially when the balance of comedy and drama is absolutely spot-on — and tonight it was.

So far, during its two-season, 25-episode run, we've had stories that focus on just about every member of the crew, some more than others , but each time Capt. Ed Mercer (Seth MacFarlane) and Cmdr. Kelly Grayson (Adrianne Palicki) have been the focus of attention, it's been as a couple. Tonight's episode, however, was much more about Grayson, which was great to see.

Related: Inside That Spectacular Space Battle in 'The Orville'

"Tomorrow, and Tomorrow, and Tomorrow" is the first part in a two-part story arc that is, sadly, the Season 2 finale. The title may have been taken from either Macbeth or from a short science-fiction story with the same title that Kurt Vonnegut wrote in 1953 about the aging process in humans being halted.

We open with Grayson and Mercer having a drink in the ship's mess with Lt. Gordon Malloy (Scott Grimes) and Lt. Talla Keyali (Jessica Szohr). They share tales of excessive drinking when they were younger; when Malloy and Keyali retire for the evening, they leave Grayson and Mercer reminiscing about old times — particularly their first date.

Mercer has made it clear that he still wants to get back together with Grayson, which is something MacFarlane has handled well; thankfully there hasn't been a single instance of unresolved sexual tension between the two in "The Orville" so far.

Isaac (Mark Jackson) and LaMarr (J. Lee) tinker with a time travel device that looks suspiciously like an elaborate snow-cone maker. (Image credit: Fox)

At the same time, in engineering, Isaac (Mark Jackson) and Chief Engineer John LaMarr (J. Lee) are tinkering with what looks like an elaborate snow cone maker. However, it's actually a temporal displacement device that Isaac believes could potentially be connected to, and therefore controlled by, the mind of a biological, or even an artificial, lifeform.

Grayson enters while LaMarr exits to perform another of his ship's duties. He's walking down the corridor when suddenly the Orville is struck by a massive gravitational wave , more than likely caused by a natural phenomenon. Grayson heads to the bridge, and as Issac is about to leave, he hears a cough behind him. Turning, he sees Grayson standing there. Understandably puzzled, he contacts the bridge; when he hears Grayson's voice from there, he initiates an intruder alert.

Following a medical examination by Dr. Claire Finn (Penny Johnson Jerald), we learn that this mysterious interloper is indeed Kelly Grayson, but it's a Kelly Grayson who is approximately 7 years younger than Cmdr. Kelly Grayson. One minute she was in her apartment on Earth, and the next, she was in engineering with Isaac, with no clue of where she was.

When Mercer and Older Grayson enter sickbay, both Graysons are naturally a bit freaked out. Adrianne Palicki plays both roles, and the interaction between the two characters is flawless. With the assistance of just a tiny bit of CGI de-ageing, the split screen performance and production is handled very well.

In the meeting room, Isaac and LaMarr offer a hypothesis: The gravitational wave that the Orville encountered amplified the temporal field generated by the snow cone maker. In this instance, the spike in field energy might have been enough to transport Cmdr. Grayson's past self into their present.

It's also possible that when Young Grayson was extracted, a new timeline was created, which is why Older Grayson can't remember any of this. So, why Grayson at all? Well, she was the one closest to the snow cone maker/time travel device at the time of the event. And why seven years? LaMarr suspects that Isaac may have been closer to completing the neural connection between the device and a biological lifeform than he realized; when the gravitational wave struck the Orville, Older Grayson was still fondly reminiscing about her first date with Mercer … which was about seven years ago.

Related: How Time Travel Works in Science Fiction (Infographic)

It's utter nonsense, of course, but the big difference between this and say, "modifying the dilithium incubator to trigger an ongoing cascade of energy within the crystal by combining it with dark energy, which will replicate the power of a supernova" is that the technobabble explanation is kept to an absolute minimum. What's said is what's needed to allow the story to flow smoothly, and no more. Excessive emphasis on some nonsensical, unnecessarily overly complicated "science" from the 23rd century isn't needed or used.

The subtleties of this episode are what really make it enjoyable. Throwaway remarks from Older Grayson about there not being enough wine on the ship for both Graysons to be able to deal with all this, for example, are priceless. Not every episode of "The Orville" finds a balance this good, but this episode does.

What follows is an extremely difficult and unusual crisis for both Graysons to have to deal with, not to mention an ethical and emotional dilemma for Mercer. MacFarlane takes a very personal issue that we'll wager almost everyone has thought about just a little bit — OK, probably everyone over the age of 40 — which is a retrospective look back at your life, and what you might do if you could change some of it.

It's a character study on adapting to events, personal evolution, growing up, how hopes and dreams change shape over time, and even how well we know ourselves.

Both Older Grayson and Mercer decide it's best to tell Young Grayson about the events of the last seven years, which of course includes their marriage and subsequent divorce, and the reasons for the split. Young Grayson is still hungry for success in life and is determined to fall in love, get married, and one day become the captain of a Planetary Union starship. Bless.

Young Kelly Grayson (Adrianne Palicki) and Lt. Keyali (Jessica Szohr) share some stories about drunken behavior at the Planetary Union Academy. (Image credit: Fox)

There appears to be little hope of returning Young Grayson to her own time, so she opts to join the crew of the Orville, since she's already a lieutenant in the Union. There's an interesting scene in which she shares a story with Malloy and Keyali in the mess about drunken behavior at the academy when Older Grayson pulls her aside and asks her not to tell that particular story or any story like that, because she — Older Grayson — is the second-in-command, with serious responsibilities, and doesn't want the crew hearing tales about her academy antics.

The situation is further confounded when Young Grayson wants to start dating Mercer; after all, for her their first date was only a few nights before. Mercer, still very much in love with Any Grayson, naturally accepts.

What follows is a hilarious and beautifully observed comedy set piece in a holosuite nightclub programme. Young Grayson and Keyali are hitting the dance floor hard, while Mercer and Malloy sit and watch, complaining like two old men that the music is too loud. It's a truly brilliant, standalone scene that picks up on many very funny elements. Watching Bortus go bananas over some pumping techno music is one of the single funniest moments so far in "The Orville." Even Yaphit (voiced by Norm MacDonald) is throwing shapes in the church of dance.

In fact, this episode has a number of very funny, well observed moments, including a futuristic console fighting game that Mercer can't get the hang of. This is a textbook example of when the comedy is well written and perfectly complements an equally well-written plot.

The nightclub incident and one or two other things remind Mercer that he's not seven years younger; he realizes that they can't keep dating because his life has changed and reluctantly explains this to Young Grayson.

In the middle of the night, two Kaylon vessels are detected, so the off-duty command crew stumble onto the bridge wearing their pajamas, slippers and robes, rubbing their eyes, and yawning. Young Grayson comes up with a clever plan to evade detection by hiding in the rings of a gas giant . It's a nice set piece — with some tasteful, artistic VFX — that's used to show that Young Grayson does in fact have some skill, despite her age and inexperience.

Isaac has come up with an idea, meanwhile, to send Young Grayson back to her own time, so once the Kaylon danger has passed, preparations are made. By reversing their quantum plasma polarity and inducing a laterally symmetric field in the ship's graviton emitters, it might just be possible. It's always about reversing the polarity.

By reversing their quantum-plasma polarity and inducing a laterally-symmetric field in the ship's graviton emitters, it might be possible. (Image credit: Fox)

Young Grayson realizes that she's better off in her own time, living her life as she should and enjoying the age that she is. However, the plan is going to require a lot of energy; plus, in order to ensure that no knowledge of the future is taken back to the past, Young Grayson agrees to a mind-wipe that would effectively remove any memory of these recent events.

The scene is set: Young Grayson lies on a bed in sickbay ready for the mind-wipe; meanwhile, in engineering, LaMarr is givin' it all she's got, but even more power in needed, so energy is diverted from every available system. Every dial is redlining, but more power is needed. Energy is diverted from even more systems, and soon the hull integrity is under threat; surely the ship can't take any more. From the bridge, Mercer tells LaMarr that if he can't do it in 10 seconds, he has to shut everything down. Isaac says they have the bare minimum of power required, and so with just a few seconds left, the memory-wipe is completed and the snow cone maker engaged.

The screen cuts to black, and we fade in to what appears to be Young Grayson's apartment. She gently wakes and seems none the worse for her ordeal. If she was sent back to the exact moment she left, then she's still hungover from the night before, when she was out on her first date with Mercer. She slowly rises and looks around the room. Her phone rings … it's Young Mercer, from her time.

Related: Time Travel: Theories, Paradoxes & Possibilities

Clearly, she has arrived back at the moment she left. He thanks her for a great night and apologizes for not playing it cool and calling the next morning, rather than the standard two-day rule all cool guys are supposed to adhere to.

But something's not quite right. Her face is expressionless, and it's something more than just the hangover. She says, "I'm sorry Ed, but it's just not going to work out" and hangs up.

Thus, a subtle cliffhanger is left for next week's end of season finale. If she dumps him, she could significantly alter the timeline and everybody's lives will be affected…

Season 2 of "The Orville" is on Thursdays at 9 p.m. ET on Fox in the U.S. The program can be watched on demand on Fox Now and Hulu, and is also available on Fox.com in the U.S. In the U.K., the program airs on Thursdays at 9 p.m. GMT on Fox. The first season of "The Orville" is available for purchase on DVD; a season pass can also be purchased from Amazon .