Both of these works are key entries in the Romantic literary movement. The Romantics emphasized the sublime, the supernatural, and madness in their creative output. Frankenstein was written and published relatively late in the Romantic movement, while "The Rime of the Ancient Mariner" was released right in the movement's heyday in the late eighteenth century, but the two share common aesthetic and technical affinities.
Frankenstein takes quite a bit from "The Rime of the Ancient Mariner," particularly its narrative framing structure. The Mariner in the present tells his story to those who will listen at the wedding, while Victor tells the events of Frankenstein as he is chasing the creature down in the North Pole.
Both works also revel in the sublime—a Romantic notion of the individual's feelings of being overwhelmed in the face of the greatness of the natural world. The Mariner, at first feeling superior to the sea and animals, comes to recognize the holiness of nature when he is alone on the ship, lost in the middle of a dangerous but immensely gorgeous ocean. The Creature feels awe at nature as well when he is wandering through the wilderness without a parental figure to guide him into the world.
Both works also share a sense of the supernatural. "The Rime of the Ancient Mariner" is packed with ghostly imagery, and the Mariner's experiences have a strong supernatural bent to them. Frankenstein is classically characterized as science fiction, but Victor's interest in alchemy and the mysterious circumstances under which he brings his creation to life evoke the idea of medieval sorcery. (Coincidentally, the Middle Ages were of great interest to the Romantics, who often idealized past eras.)