I thought I'd heard the poem somewhere. I found the following by googling:

AN APOLOGUE.
A NEW VERSION OF AN OLD STORY.

Will you walk into my parlour?" said the Spider to the Fly,
'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious things to shew when you are there."
Oh no, no," said the little Fly, "to ask me is in vain,
For who goes up your winding stair can ne'er come down again."

"I'm sure you must be weary, dear, with soaring up so high;
Will you rest upon my little bed?" said the Spider to the Fly.
"There are pretty curtains drawn around; the sheets are fine and thin,
And if you like to rest awhile, I'll snugly tuck you in!"
Oh no, no," said the little Fly, "for I've often heard it said,
They never, never wake again, who sleep upon your bed!"

Said the cunning Spider to the Fly, " Dear friend what can I do,
To prove the warm affection I 've always felt for you?
I have within my pantry, good store of all that's nice;
I'm sure you're very welcome -- will you please to take a slice?"
"Oh no, no," said the little Fly, "kind Sir, that cannot be,
I've heard what's in your pantry, and I do not wish to see!"

"Sweet creature!" said the Spider, "you're witty and you're wise,
How handsome are your gauzy wings, how brilliant are your eyes!
I've a little looking-glass upon my parlour shelf,
If you'll step in one moment, dear, you shall behold yourself."
"I thank you, gentle sir," she said, "for what you 're pleased to say,
And bidding you good morning now, I'll call another day."

The Spider turned him round about, and went into his den,
For well he knew the silly Fly would soon come back again:
So he wove a subtle web, in a little corner sly,
And set his table ready, to dine upon the Fly.
Then he came out to his door again, and merrily did sing,
"Come hither, hither, pretty Fly, with the pearl and silver wing;
Your robes are green and purple -- there's a crest upon your head;
Your eyes are like the diamond bright, but mine are dull as lead!"

Alas, alas! how very soon this silly little Fly,
Hearing his wily, flattering words, came slowly flitting by;
With buzzing wings she hung aloft, then near and nearer drew,
Thinking only of her brilliant eyes, and green and purple hue --
Thinking only of her crested head -- poor foolish thing! At last,
Up jumped the cunning Spider, and fiercely held her fast.
He dragged her up his winding stair, into his dismal den,
Within his little parlour -- but she ne'er came out again!

And now dear little children, who may this story read,
To idle, silly flattering words, I pray you ne'er give heed:
Unto an evil counsellor, close heart and ear and eye,
And take a lesson from this tale, of the Spider and the Fly.

Mary Howitt 1804


Notes on Life and Works
Mary Botham, born at Coleford, Gloucestershire, was daughter of Samuel Botham, a Quaker, and in 1821 married William Howitt. They turned to joint-authoring for a living and made a success of their many interests. She wrote novels such as Wood Leighton, a history of the United States, and many poems and stories for children; and she translated both the Swedish novels of Frederica Bremer and Hans Christian Anderson's fairy tales (as Wonderful Stories for Children). They lived abroad at Heidelberg and Rome, where she died in 1888, having converted from Quakerism and spiritualism to Roman Catholicism in 1882. Her daughter Margaret edited the Autobiography of her mother (London: W. Isbister, 1889; PR 4809 H2Z52 Robarts Library). Mary's books of verse include Sketches of Natural History (1834) and Ballads and other Poems (London: Longman, Brown, Green and Longmans, 1847; PR 4809 H2A6 Robarts Library).
http://www.library.utoronto.ca/utel/rp/authors/howittm.html#notes

As the poem calls it a new version of an old story, my guess is that it is based on a folk tale, maybe someone can find an earlier reference.