We study the effect of heterogeneous temporal activations on epidemic spreading in temporal networks. We focus on the susceptible-infected-susceptible (SIS) model on activity-driven networks with burstiness. By using an activity-based mean-field approach, we derive a closed analytical form for the epidemic threshold for arbitrary activity and inter-event time distributions. We show that, as expected, burstiness lowers the epidemic threshold while its effect on prevalence is twofold. In low-infective systems burstiness raises the average infection probability, while it weakens epidemic spreading for high infectivity. Our results can help clarify the conflicting effects of burstiness reported in the literature. We also discuss the scaling properties at the transition, showing that they are not affected by burstiness.