> Was the orbit of Mercury (or any other astronomical observations) important for the discover of Relativity.For general relativity, yes.
> My understanding was that experimental impetus for relativity was the Michelson–Morley experiment
This was one of the results that pointed the way to special relativity. It had nothing to do with general relativity.
> General relativity was then developed on a purely theoretical basis.
No, it wasn't. There was a huge body of experimental evidence already about gravity. It was true that all of that evidence, except for the anomalous precession of Mercury's perihelion, could be explained by Newtonian gravity; but general relativity, as a proposed new theory of gravity, had to also account for all of that experimental evidence. In other words, in the appropriate limiting case (weak fields and low speeds compared to the speed of light), general relativity had to reproduce all of the correct predictions of Newtonian gravity. That was a huge, and very important, experimental constraint.
> Almost by definition, a theory that is ultimately useful can be confirmed without need of astronomy.
Not if the differences between its predictions and the predictions of the previous theory (in this case Newtonian gravity) are only measurable in astronomical observations at the time the new theory is proposed. That was true of general relativity in 1915 and for at least a couple of decades afterwards. The differences between GR and Newtonian gravity for earthbound experiments were simply too small for the technology of the time to measure. So astronomical observations were the only way to test GR when it was proposed.
> we could probably get GPS to work even without relativity
Technology can of course be developed on a purely empirical basis, if you're prepared to make a lot of mistakes along the way that you wouldn't make without a good theoretical foundation. If it hadn't been for the knowledge of relativity on the part of the scientists involved, the GPS satellites probably would have been launched without any capability for adjusting their clock rates. Which would have meant that, once clock rate drift due to relativistic effects was seen, there would have been no way to adjust for it. So those satellites would have become expensive but useless toys, and a new constellation of satellites would have had to be built and launched.