Strange behaviour in PCB when solenoid turns off
One major problem is that the solenoid current passes through the same conductor that is ground for the chip. You should run it back separately- that can be even better than just blindly throwing a lot of copper at it. 

You may be able to salvage this layout by cutting the trace to the MOSFET source and bypassing it with a flying lead, and/or by adding series resistor to the gate of the MOSFET- that will slow the switching of the transistor and reduce that transient on the ground trace, at the expense of a bit of heating during the switching operation. Try something like several K and increase the shunt resistor if required to maintain most of the gate drive.