There is a lone wire on the alternator that lets you know the alternator is putting out (ummm, taken out of context?)
this wire jars loose easily, as it is a short wire with a flimsy connection.
I have circled the wire in question.
When you put the car into gear, it may jar it loose.
You will notice how short the wire is, and you will understand WHY it can come loose.
check this first, and you may have to put in a short extention of your own wire to get a good connection. Radio shack or parts shop (like auto zone) will have parts you need.
I had the same problem with my car. Just do not mistake this small wire with the big one that supplies all the current from the alternator.
This problem could also be low power output which drops further when you're in drive. IE 600rpm in gear VS 1,000 or so at idle in park or neutral. I'd check the alternator output at idle and again with all the accessories on. If it's dropping below 13 Volts, I suggest replacing the alternator. This is of course after you are sure all the connections and terminals are ok and not the problem. I had a similar problem myself. At idle in park with no accessories on, the car was charging at 13.4 Volts. Then with all the accessories on, output dropped to 12.6Volts. Fortunately I had a spare alternator so I popped that in and she's now charging at 14 Volts at idle with all accessories on.