Two-bit is compared to a “Chessy cat,” the malevolently grinning Cheshire Cat from Alice in Wonderland. Two-bit is grinning because he pulled a prank.
In this allusion to Alice in Wonderland, Two-bit is described as grinning in a self-assured, at-your-expense way.
I looked fearfully over my shoulder and there was Two-Bit, grinning like a Chessy cat. (ch 2)
Two-bit sneaks up on Johnny and Ponyboy and pretends to be a Soc to scare them.
The Cheshire Cat is a particularly sneaky grinning cat that Alice encounters, but the term did not originate with the book. In fact, to grin like a Cheshire cat is actually British slang dating to the 18th century. The term “Chessy cat” is an American amalgamation of the term based on the popular children’s book. Either way, it implies being very happy about something and most likely at someone else’s expense.
The allusion to literature is fitting both as teen slang and as a literary allusion. Ponyboy is an avid reader and highly intelligent, so it makes sense that he would have read Alice in Wonderland. Most readers are also familiar with the book, and the sneaky Cheshire Cat, and will likely accept Two-Bit’s sneaking up on Ponyboy and Johnny.
I think you had mean the Cheshire cat, a provable, always grinning cat from Cheshire, England and is most prominently know in Lewis Caroll's book Alice in Wonderland, as the cheerful character. This cat possessed magical qualities, which can make her invisible to other people
By using this comparison (Two-bit to cat), he is trying to make a imagery or a allusion to represent his happiness and his cheerful grin when they were walking back with Cheery, a Soc. Ponyboy is comparing this image to the Cheshire cat, also showing a happy demeanor (most know for its toothless grin)
Chessy cat comes from "Cheshire Cat" from Alice in Wonderland.
Since he's talking about a book, it's an allusion.