Most song lyrics can be considered as poetry - sometimes a lyricist or poet will dispense with certain rules of grammar in order to add aesthetics elements to their writing, so don't get too hung up on grammar when it comes to works like this. Yes, the intransitive verb "lie" seems more appropriate than the transitive "lay", but you'd have to ask the artist why he made that choice. It may have been for aesthetics (ie it sounded better, or possibly even looked better - "lady" is only one letter different from "lay"), it may have been so that there was no confusion with the other meaning of "lie" (to tell a mistruth), or possibly even a pun on the alternative slang meaning of "lay", to have sex, which would also fit with the meaning of the song - he is asking her to lie down with him.
Other than that, the construction seems grammatical to me if one adds the punctuation: "Lay, Lady, Lay". According to the Wikipedia entry for the song, it is often rendered this way anyway.
"Lay, Lady, Lay" is as grammatical as the lyrics "Go, Johnny, Go" (Johnny B. Goode), or "ride, Sally, ride" (Mustang Sally). It is a verb used as an order, the noun the order is addressed to, and then a repetition of the verb, either to emphasise the order or to denote continuation.