The term Holy Grail was used to described any ultimate, but elusive, goal pursued in a quest.
Upon learning about the Borg's desire for the Omega molecule in 2374, Kathryn Janeway called it the Borg's Holy Grail. (VOY: "The Omega Directive")
In 2375, Doctor Julian Bashir claimed that the Holy Grail of organ replacement would be to come up with a way to inject the patient with undifferentiated tissue that could become whatever organ is needed. (DS9: "When It Rains...")
In the 32nd century, Cleveland Booker described Michael Burnham's gear from the 23rd century as the holy grail for antique collectors who loved to live in the past. (DIS: "That Hope Is You, Part 1")
The term comes from Christian mythology in which it was an artifact associated with Jesus Christ. The metaphorical meaning of the term was inspired by its role in Arthurian legend.