Middle English (in the general sense 'adviser'): from Old French conseiller, from Latin consiliarius, and Old French conseillour, from Latin consiliator, both from consilium 'consultation or advice'
A counselor is someone who gives advice or counsel, especially an attorney. A councilor is a member of a council, such as a town or city council. Confusion arises because many counselors sit on councils, and councilors are often called on to give counsel.
Remember that counselor has one l (the spelling counsellor is British).