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.