With the help of the newly proposed definition of entanglement, the entanglement dynamics of a system composed of two bosonic atoms trapped in a symmetric double-well potential is investigated. For any state of this system, the description of Majorana representation can be analytically derived. It is found that the entanglement dynamics depends on both the atomic interaction and the initial state of the system. Specifically, the atomic interaction determines the oscillation frequency of the entanglement degree, whereas the initial state controls the oscillation amplitude.