"Woodchuck" is a name for a marmot, Marmota monax, also known as a groundhog. The name comes from a native American (Algonquian or possibly Narragansett) wuchak.
Wikipedia says the tongue-twister comes from a 1902 song, but the song is really from 1903. It was however a nonsense verse published in a children's magazine in 1902 or earlier.
Wikipedia: "The Woodchuck Song" (1902?)
Wikipedia says:
The origin of the phrase is a 1902 song, "The Woodchuck Song", written by Robert Howard Davis for Fay Templeton in musical The Runaways.[ 7 ][ 8 ]
The references are:
7. The Tammany Times - Volumes 20-21 1902- Page 305 ""How much wood would a woodchuck chuck, If a woodchuck would chuck wood?" That is the beginning of the refrain of a song that Mr. Robert Howard Davis has written for Fay Templeton in “The Runaways.” Miss Templeton is trying the song ...
8. Hobbies - Volume 78, Issues 1-6 - Page 119 Otto C. Lightner, Pearl Ann Reeder - 1973 "Mathias quotes Davis as saying he made $20,000 from the sale of "The Woodchuck Song" (this must have been from sheet music, for royalties were not paid on record sales in those days) after he and Morse called at Fay Templeton's home .."
I looked up the first one. The 1902 probably via a Google Books snippet, but it cannot be verified. Here's the relevant part from the more reliable HathiTrust:
Scrolling back three pages, we see the this edition (Vol. XXI No. 25) of The Tammany Times was published in October 17th, 1903, not 1902. The book contains many issues, the first of which was 1902, hence the mistake at Wikipedia. The article tells us:
The musical production opened for a run of indefinite length about the first of last May, bringing the two hundredth performance at the Casino last Wednesday, ...
And:
"How much wood would a woodchuck chuck, If a woodchuck would chuck wood?"
That is the beginning of the refrain of a song that Mr. Robert Howard Davis has written for Fay Templeton in “The Runaways.” Miss Templeton is trying the song on Casino audiences the latter half of this week, and is making it one of the pronounced song successes of
the season.
This suggests to me the song is a fairly new addition to the musical.
It's also mentioned in these October 15th and this October 24th, 1903 newspapers, and this from October 24th, 1903:
Fay Templeton has a new song in "The Runaways" that has caught all Broadway. It was written for her by Robert H. Davis, and the two lines which are most widely quoted are the
following:
"How much wood would a woodchuck chuck if a woodchuck would chuck wood."
Wikipedia's second reference also says 1903 and not 1902:
In 1903 Robert Hobart Davis and Theodore F. Morse gave birth to a "classic" which was published under the title of "The Woodchuck Song." It is, however, usually referred to as "How Much Wood Would a Woodchuck Chuck If a Woodchuck ...
Chronicling America: The Indianapolis Journal (1902)
So, is there anything earlier? The earliest I found in the Chronicling America newspaper archive is from The Indianapolis Journal, February 09, 1902 (Part two, Page 10, Image 20):
The other day I picked up a children's magazine and found a nonsense verse which ever since has been making life a burden to me. More than that, I have repeated the verse to many of my friends, and they, too, have been sent to the borderland of Insanity. This is the
verse:
" 'How much wood would a woodchuck chuck
If a woodchuck could chuck wood?
A woodchuck would chuck all the wood he
could chuck
If a woodchuck could chuck wood. "