is it correct to ask: Have you ever gone to Spain? if i want to know whether or not he had visited Spain in his life (experience)?
I don't know what you mean by "is it correct to ask", but a more idiomatic as well as more conventional way to ask someone if they have visited a particular place at least once in their live would be:
Have you ever been to Spain?
Have you ever been to London?
You would use been in this situation rather than gone.