While mapping a series of gravitational anomalies, the Enterprise is suddenly hurled millions of light-years through space, into a distant galaxy of scorched and lifeless worlds...into the middle of an endless interstellar war.
With no way back home, the crippled starship finds itself under relentless and suicidal attack by both warring fleets! Captain Kirk must gamble the lives of his crew on his ability to stop a war that has raged for centuries--and ravaged a galaxy.
The Enterprise is studying some anomalies that act sort of like wormholes by instantly transporting an object across a distance. The distances vary throughout the trials, and they are unable to determine what factors influence how far an object will be moved. Suddenly, they find themselves in an unfamiliar galaxy with no idea where they are in relation to home. As they begin to explore the are in hopes of finding a way back, they find themselves entangled in an interstellar war that has raged on for millenia.
This is a pretty good Star Trek novel. It is somewhat reminiscent of Voyager, with the alien technology causing a ship to be sent across vast distances to an unknown place far from home, but the book was published in 1987.