Programming PIC16F877a using PICKIT3
Power the PIC from the same power supply as the Arduino. Remove the Vdd connection to the PIC from the PICKIT3. It may also help to add a 10k resistor from PGM on the PIC to ground. Make sure you have your PICKIT3 set to the correct processor.

You should then be able to program the PIC.