This word came into English at the beginning of the 17th century, and Shakespeare is the first recorded user of two of its senses.
The first can be seen when Pericles talks about "the rapture of the sea" (Pericles, II.i.156): he is referring to its ability to carry things away - reflecting the etymology of the word in Latin rapere "to seize".
The second occurs when Brutus talks of the reception given to Coriolanus by the people: "Your prattling nurse Into a rapture lets her baby cry While she chats (gossips about) him" (Coriolanus, II.i.199). Here the word means a fit or convulsion of passionate excitement.
Neither of these senses remains today; all we have now is the use of rapture to express an ecstatic state of mind. This meaning became frequently used a little later in the 17th century - it is common in Milton, for example - but it is already there, just once, in Shakespeare, when Cressida tells her lover "in this rapture I shall surely speak The thing I shall repent" (Troilus and Cressida, III.ii.129).