Its worth placing this in context a little, in Platos time it would appear that poets, rhapsodes and playwrights were held in far greater esteem than philosophers were. They had, as Socrates admits in this dialogue the reputation of being 'wise' whereas he merely speaks the 'truth'.
Socrates - but you rhapsodes and actors, and the poets whose verses you sing, are wise; whereas I am a common man, who only speak the truth.
It's also worth noting he mocks himself too, for he he wasn't considered a handsome man, but he says:
I often envy the profession of a rhapsode, Ion; for you have always to wear fine clothes, and to look as beautiful as you can is a part of your art.
This of course can also be seen as flattery or simple courtesy. To be able to refine this judgement one would have to be cognisant of the mores of the time.
When Socrates talks about art here it is in a more general than the contemporary sense, closer to the ideas of an artisan, craftsman or technician. He is thinking of the idea of knowledge. This should be understood from his other examples of art - the art of medicine, the art of charioteering etc. He wants to distinguish this prosaic form of knowledge from that of the inspired, that is the gift of the muse. This is Art with a capital A. It is only when Ion asks him to explain his gift as a rhapsodist that Socrates himself breaks out into his first impassioned speech of this dialogue (one notes uptil then he had spoken only in short statements)
Socrates- ... The gift which you possess of speaking excellently about Homer is not an art, but, as I was just saying, an inspiration; there is a divinity moving you, like that contained in the stone which Euripides calls a magnet, but which is commonly known as the stone of Heraclea... In like manner the Muse first of all inspires men herself; and from these inspired persons a chain of other persons is suspended, who take the inspiration. For all good poets, epic as well as lyric, compose their beautiful poems not by art, but because they are inspired and possessed... For the poet is a light and winged and holy thing, and there is no invention in him until he has been inspired and is out of his senses, and the mind is no longer in him: when he has not attained to this state, he is powerless and is unable to utter his oracles.
... for not by art does the poet sing, but by power divine. Had he learned by rules of art, he would have known how to speak not of one theme only, but of all; and therefore God takes away the minds of poets, and uses them as his ministers, as he also uses diviners and holy prophets, in order that we who hear them may know them to be speaking not of themselves who utter these priceless words in a state of unconsciousness, but that God himself is the speaker, and that through them he is conversing with us...
And Ion finds himself persuaded, he answers:
Ion - Yes, indeed, Socrates, I feel that you are; for your words touch my soul, and I am persuaded that good poets by a divine inspiration interpret the things of the Gods to us.
Socrates far from mocking Ion or flattering him appears to be himself talking under the guise of inspiration which accounts for Ion saying that his 'soul is touched' by Socrates speech and he is thus 'persuaded'. But he isn't completely convinced and demurs:
Ion - That is good, Socrates; and yet I doubt whether you will ever have eloquence enough to persuade me that I praise Homer only when I am mad and possessed; and if you could hear me speak of him I am sure you would never think this to be the case
Ion has misunderstood Socrates when he says that 'God takes away the mind of poets' or he 'is out of his senses, and the mind is no longer in him', he understand this to be mad and possessed in a pejorative sense.
Socrates then engages in a dialectical questioning which ends with Socrates affirming this fact and pushing Ion to acknowledge it unreservedly:
Socrates - But if, as I believe, you have no art, but speak all these beautiful words about Homer unconsciously under his inspiring influence, then I acquit you of dishonesty, and shall only say that you are inspired. Which do you prefer to be thought, dishonest or inspired?
Ion - There is a great difference, Socrates, between the two alternatives; and inspiration is by far the nobler.
Socrates - Then, Ion, I shall assume the nobler alternative; and attribute to you in your praises of Homer inspiration, and not art.
I don't know whether this is the generally accepted sense in our modern times, but certainly it appears to me that Socrates is quite seriously arguing for divine inspiration and he distingushes this from prosaic knowledge and technique, or art as he calls it and pushes Ion quite hard through dialectical questioning to accept this 'fact'.