Shari, Google came up with two solutions (I'm sure there must be more, hopefully if someone knows of a program that does this they'll pitch in with an answer - but if these are not suitable, try searching for 'track time against retainer' or 'bill time against retainer' and similar variations to find more options.)
Bill Quick appears to have a free 30 day trial with tech support and it lists billing against retainer as one of the features. It also integrates with Quick Books, but I can't find the price!
Billing Tracker also has a free trial download and lists billing against retainer as a feature. Looks like the paid product license costs just less than $100.
There's also a software directory called Capterra, where you might find more options.
Here's a link to their time tracking options page.