Happended to me on a Seneca III.
If it is a King HSI with flux valve and the HSI heading reference comes from remote gyros there is a deviation indicatior together with the "SLAVE" "FREE" Switch. Look at this.
I once was than 40° off correct HDG. For some weird reason that slaving mechanism was unable to slave the HSI. No warning Flag no nothing. Just noticed the deviation to the standby compass and that flag indicating a deviation on the slave.
Possible reasons:
Low voltage, low battery, low alternator output.
A quick swing during line-up. One of these that happen on good days when everything works fine and you get an immediate departure - up to the moment when ATC calls you "Confirm HDG 270"...