I know that Bioshock 1+2 are considered good games, but do I have to play them in order to understand the story in Bioshock Infinite? Or can I just start with Infinite right away?
No. Bioshock Infinite's story is completely separate from that of Bioshock 1+2, which are somewhat tied together. Only in small parts (and in DLC as part of the Bioshock Infinite Season Pass) do the stories from 1+2 overlap with that of Infinite's.
So this is what I think:
If you are getting the DLC for Bioshock Infinite, play Bioshock 1 + 2 to get a good grasp of the timeline.
If you aren't getting DLC, you won't be spoiled by much other than miniscule overlapping parts from Bioshock 1 + 2 in Infinite.
The storylines of 1 & 2 could be considered to roughly coincide, but Infinite stands alone in terms of storyline. The Universe is also completely different, but follows a similar structure to 1 & 2.
So to put it plainly; no. If you play Infinite before you play 1 & 2, you won't spoil anything.