I have had this on my 2003 A4 1.9Tdi Sport.
Don't panic!
In my case, I had damaged the microswitch that is under the brake pedal. This was causing the car to get upset because the car was braking but the lights and engine didn't think it should be. After a while the ESP light came on too at about 80mph. Getting VAGCOM or any other ECU diagnostics will detect this.
I also had the same issue on my 1998 A4 1.8T Sport - this time it had the same issues but was the actual sensor. I sorted mine by cleaning the sensor and making sure that there is no dirt around it. Reseating it seemed to do the trick. If not, I found the sensor for about £100 from GSF in Reading.