The PIC UART can be picky. Did you remember to check the Frame Overrun (OERR) bit? The PIC will be unable to receive UART communications until the OERR is cleared.
EDIT: I was also thinking...perhaps you could try a sort of loopback? That is, cut the UART out of the loop, and when the PC sends anything over USB, just send it straight back. This would tell you whether the issue is with the UART or the USB side of the PIC.
I have no experience with the CDC but I have some with the MSD class. Some steps I did and may be useful for you. First, let's create a stand alone project:
1) I assume you have downloaded and installed the MAL (Microchip Application Libraries). Copy to your example directory the following files: usb.h, usb_ch9.h, usb_common.h, usb_config.h, usb_device.h, usb_device_local.h, usb_hal.h, USB PIC18.h, usb_function_cdc.h, usb_function_cdc.c and add them to the MPLAB X project. Remove the libraries from the MPLAB project.
2) Compile it, link it, and see if it's still working ok.
3) Using MPLAB X, remove all the code lines that are grayed in the #ifdef or #else preprocessor blocks. That is, remove all the code intended for other architectures that are not intended for a PIC18F45XX.
4) Repeat 2.
5) If you start studying the code now, you'll notice that it's much simpler than what you thought in the beginning, and you will have much more control over you project.
Hope this helps.
Best Answer
The FT232R mentioned by Toby is the standard solution. FTDI has become the main supplier of USB connection solutions for microcontrollers and other logic devices. You install a Vitual COM Driver on your PC (downloadable from the FTDI website) and then you use the USB as a transparent communication channel for your UART. Means that the PIC will only see UART in and out, and the PC software will think the PIC is connected to a serial COM port.
This is the minimum configuration. As you can see that it's hardly more than the IC and the USB connector.
A breakout board like this one only needs ground Tx and Rx connections with the microcontroller. If necessary it can also provide the power supply for it.
edit
m.Alin mentions the Microchip MCP2200 as an alternative to the FT232R. I didn't know the device, and only had a quick look at the datasheet, but it looks promising: only half the price of the FT232R, and has both UART and GPIO. Breakout boards available:
(I'll study the datasheet a bit more tomorrow and report back.)