A couple(?) of crew are on board a spaceship. One of them is a robot.
They find a planet that disappears periodically and reappears and changes drastically. Unbeknownst to the locals, they go down to the planet and a woman in the crew of the spaceship heals an injured person with a device. The civilisation praises them and executes many people in her name.
The robot is sent to stay on the planet to see where it goes for the time it is gone. It says something like "What is for you 500 years, is for me a blink of an eye" or something like that
When then planet reappears, the civilisation is more advanced than the crew of the spaceship and they realises that woman was not a god.
Note. It's definitely not Star Trek: Voyager (Blink of an Eye) although there are some parallels