You can directly visit the Eiffel Tower if its an off season or a weekday. Else it is better to book online. It costed under 30€ to go to the top floor.
You have a small counter just below the tower. u need to stand in a queue (which is Generally long during weekends and morning evening time). so u can buy from there