Even though the USB port of the RPi is technically an On-the-go (OTG) chip that should support both a reduced set of host and client functionality (and could therefore play the role of an USB slave such as an HID) the B/B+ type of the RPi does not support the device mode. That is related to the included USB hub and the fact that the ethernet is tunneled through USB (see).
But... the Human Interface Devices (HID) only need the USB 1.1 Low Speed with 1.5 MBit/s data rate (well almost they say). So there are many solutions out there that use software based USB stacks to emulate an USB device. Those examples typically use microcontrollers that are way less "powerful" than the RaspberryPi (but of course they also have a significantly lower overhead). Examples include the Igor Plug (an IR remote control receiver based on an Atmel microcontroller) or microcontroller based "fake" keyboards or "key loggers".
If we believe How fast is GPIO+DMA? Multi I2S input then 1.5 MBit/s should be possible on the GPIO with DMA.