The knock sensor is the solution that many manufactures use to adjust the timing on vehicles because people are too cheap to use the proper grade of gasoline in vehicles. Or a manufacturer wants to make a high performance vehicle accept lower grades of gasoline.
If it is not working properly, it will feed the wrong signal to the computer and give you timing problems so it needs to be fixed or you'll get hesistation and poor combustion.
Labor sounds a bit steep, but it really depends on where the knock sensor is located. It could mean that the mechanic needs to remove a lot of parts to get to the knock sensor, which is very common these days.
Ok what does the Knock sensor do.
Nissan wanted to build a high compression engine to place in side the Maxima. High compression engines require high octane fuels. (High octane means the fuel is less likely to spontaneously ignite). This give the car more power.
However some people complained that it was too expensive to only put premium gasolines in certain vehicles so manufacturers started installing knock sensors. What happens now is it allows a person to use a lower grade of gasoline such as 87 octane, and not experience spontaneous ignition. What typically happens is ignition is retarded so that the air/fuel mixture is not ignited at the highest compression, but at a compression ratio less than maximum to prevent spontaneous ignition. Which really defeats the whole purpose of putting in a high compression engine in a vehicle in the first place.
If you are using 87 octane and the engine ignited at the point of highest compression. What happens is the fuel also begins to spontaneously ignite in other areas of the chamber. The creates multiple flame fronts inside the cylinder and as they collide, shock waves are generated inside the cylinder. These shock wave will damage the engine. They are typically heard as "knocks" or pinging coming from the engine. If the knock sensor detects the "knock" it knows to retard spark, and does so until the engine does not experience the knocking noise. Thus minimizing other flame fronts and shock wave.