Okay I just ran this series of tests, it simply confirms what's already been said, namely that a leader boosts a guns accuracy if he meets three requirements -
firstly
he must have a Command Rating
secondly
he must be able to see the target
and thirdly
he must place the gun in command
(He can be any rank, the guy below is a humble infantry platoon leader)
Reminder - the lightning flash in his data strip means he has a command rating of '1', and the hilite box round it adds another '1', so his command rating is 2 (the maximum) which boosts accuracy more than a '1'.
1 - Here the guns hit chance is 42% because its out of command..
2 - The leader moves up to put the gun in command, but its hit chance is still only 42% because the leader can't see the target KV-1.
3 - The leader moves forward slightly and can now see the target and bingo! the guns accuracy gets a boost..:)