PICkit 3 requires device erase in IPE before programming in MPLAB-X
These problems tend to be hardware related. 


Do all the power inputs have decoupling capacitors. 
Is there enough bulk capacitance on the board. 
How long are the programming wires. 
What is powering the board. 


Powering the target board with the pickit3 is usually a recipe for trouble. The ICD3 is a bit more heavy duty than the pickit3 both in power regards and in how much load the data pins can tolerate. 

It's also possible that the pickit3 is failing. Microchip will warranty the programmer for free.