In an intense and non uniform gravity field, the various parts of a moving body tend to follow different trajectories, and will unless the whole structure is tied strongly enough to prevent flying apart in pieces.
This is the tidal effect, which is actually causing tides on Earth seas. It is only deformation of the structure, as Earth gravity maintains the planet integrity, but not quite the shape for the fluid parts.
In an answer to a previous question, Can spaceships really explode in space?, after attempting to give an abstract view of more traditional energy-explosion weapons, I tried to imagine another kind of weapon, based on physical laws (hopefully), and I came up with the tider.
The idea is to create in intense non-uniform gravity field near a ship to dislocate it by tidal effect. A black hole would certainly do, but I tried not to be specific (hoping physicists will not mind).
Following a comment by another user, I am now wondering whether such a weapon has been suggested in some existing SciFi work, written or film. Particularly without using a black hole for that purpose, but rather something like gravity waves, or other (I wonder whether a gravity soliton might make sense, but it may move too fast to do damage).
Precisions added after 3 answers
I tried to ask a very specific question, as I explain in the motivation. I am not asking a long list of uses of gravity tidal effects in science fiction stories, as this is clearly against the rules of SE. I think it may be interesting to see whether authors attempt to use a physical phenomenon to a specific end.
Not respecting the spirit of the question will lead to a closing vote, with no benefit to anyone.
The question was specifically about weapons, which rules out Niven's Neutron Star story, as it is not about gravity weapons.
Though I may not have been insistant enough, I did say that I was not interested in black holes (or implicitly neutron stars) answers, as these are a bit obvious, and I knew it had been used (even though I did not remember specifics).
The gravity gun, and gravity bomb of Star Wars is a much closer answer as it does use gravity waves to dislocate ships. The one thing I do not like is that is is done with some kind of explosion. Though I did not say it explicitly, I was trying to exhibit a weapon that does not cause or use explosion.
The Ender answer is in a way the one I like most so far, as it suggests original uses of an existing (in the story) gravity based technology. The only drawback is that it remains vague, and does not seem to be based on tidal effect as asked. Another weakness is that it is speculative even in the story, which is surprising given the context. Having gravity based weapons should be expected for a culture at war that masters gravity technology.
The answer of Kyle Jones, though interesting in its diversity if lists were allowed, is based mostly on black holes, which is not what I am looking for.
Nevertheless, thanks a lot for answering, as these answers help making the question more precise, and identify interesting side issues on technology consistency.