You are missing a lot of critical details.
Exact model of Mac and version of macOS being used. You can get this information by clicking the Apple menu and selecting "About This Mac".
Make & model of the external drive.
File system on the external drive.
What exactly happens when you connect the drive? Are there any error messages...if so, then what is the error message?
And when you try to repair it? When you try to erase it?
Are you using any third party software to manage the drive? Are you utilizing the drive's built-in hardware encryption feature if equipped?
Make sure to connect the drive directly to the computer and disconnect all other external devices in case one of them is causing a problem.
I may have overlooked a few questions, but we need answers to all of these questions and any other details which may be relevant such as how did the drive become ejected?
It would also help to know what you have already tried so we don't suggest them and to know how the drive information may have changed since the problem first occurred.
Edit: How was this external drive being utilized? As a data drive, a boot drive, or a Time Machine backup drive, or other type of backup drive?