Gandhi is saying that the moral man must use his intelligence and power of thought if he is to understand morality. Otherwise, he will merely follow along with the prevailing opinions of others which may or may not be moral or ethical.
The simile: let himself be swept along like a log of wood in a current, is quite self-evident. A log in a current would be carried downstream according to the pull of the current.
A man who doesn't make his own decisions (with regard to morality) will be like that log: following the current of the opinions of others, which is clearly not a conscious decision to be a moral man.
The lead up to the quote makes the context more clear:
A moral act must be our own act; it must spring from our own will. If we act mechanically, there is no moral content in our act. Such action would be moral, if we think it proper to act like a machine and do so. For in doing so, we use our discrimination. We should bear in mind the distinction between acting mechanically and acting intentionally. It may be a moral of a king to pardon a culprit. But the messenger bearing the order of pardon plays only a mechanical part in the king's moral act. But if the messenger were to bear the king's order, considering it to be his duty, his action would be a moral one.