With the kind of sophisticated radar and satellite systems that India has, it is nearly impossible that we would be hit by a missile just out of nowhere.
Even if we do not immediately get to know the source of an incoming missile, we would detect its

movement towards us soon enough to destroy it in air.

Let’s see what do we have in our kitty for such a scenario.
The Indian Navy has 3 sets of Guided missile destroyers that can destroy any missile approaching towards India via over the oceans:
Kolkata-class destroyer
​(INS Kolkata)

Then we have the Barak 8 and Akash surface-to-air missiles that can effectively defend us from any airborne threat.

In addition, India has the KALI (Kilo Ampere Linear Injector). It is a linear electronaccelerator being developed inIndia, by the Defence Research Development Organization (DRDO) and the Bhabha Atomic Research Centre (BARC). It is designed to work in such a way that if an enemy missile is launched in Indian direction, it will quickly emit powerful pulses of Relativistic Electrons Beams (REB) and destroy the target in no time.
Once the threat is eliminated, it won’t take us long to identify the rogue nation that launched it, if we do not know it already, that is.
In case our radars and satellites fail to give any conclusive data as to who the rascal was, we can seek American and/or Russian assistance in finding the same.
And once we get to know who it was….
Allah bachaye unki jaan.. (May God save them)
[All images are from Wikipedia]
1. A few people feel that this answer is an overstatement.
Of course we aren’t competent enough to handle a full-fledged air strike by countries like the US, France or Russia. But please note what the question talks about. A missile coming to us from apparently nowhere. If we were to have tensions with a matured power like the US or Russia or even China, things would need months, if not years, of escalation to come to a point where either side even considers an airstrike. Nobody would just press a button playfully and launch a missile, unless it is someone like Pakistan or North Korea. For such stupid nations both, my answer and India’s defence arsenal, are good enough.
2. This answer is government-independent and politically neutral. Despite all the rhetoric by the Honourable Prime Minister and the Defence Minister, there is a set of principles that the country follows when it comes to defence and diplomacy. For the regular border skirmishes and general ceasefire violations the present government too would do nothing more than conventional diplomacy and high-level talks. But when faced with the scenario that the question deals with, any government would hit back hard.