The meaning for "fire" is to dismiss from a job. Itself has no negative sense. It is just an opposite to "hire".
The meaning for "layoff" are misunderstood by a lot of people. For most cases, the so-called "layoff" should be called 'termination". While original sense for "layoff" is that the one gets laid off actually has chance to be called back to continue work for the same firm.