Ciao Angela,
No - the Boboli Gardens ticket (which includes a few of the Pitti Palace museums) does not really require that you buy ahead of time, the ticket office there generally does not have a line. The line is after, when when you want to get in, since there is a metal detector to go through and that can get a little long. Totally depends on the time of the day - I've seen it quite long in the morning but there is no set rule, it really depends on chance, the day, the weather.... so I'd say to just go and see what you find. The ticket is valid for 3 days so you get the ticket and go back later in the day, if the line to get in were to be a bit long.