- Math --
Another version of @StarMan's answer using only the prolific† vis-viva equation to find the minimum velocity at 1 AU that will graze the Sun:
$$v_{1 AU}^2 = GM_{Sun}\left(\frac{2}{1 AU} - \frac{2}{r_{peri} + r_{apo}} \right)$$
where $GM_{Sun}$ is $1.327 \times 10^{20} \ \text{m}^3 / \text{s}^2$, $a = (r_{peri} + r_{apo})/2$ and $r_{peri}$ is the radius of the Sun.
It's no coincidence that this looks exactly like @ErinAnne's answer as well; there's only so many ways to enforce conservation laws.
The minimum of $v^2$ will be where $r_{apo}$ is also 1 AU ($1.496 \times 10^{11} \ \text{m}$).
With $r_{Sun}=6.957 \times 10^8 \text{m}$ that gives 2865 m/s confirming the other answers.
†https://space.stackexchange.com/search?q=%22vis-viva%22
- Physics --
Wouldn't it inevitably spiral down to sun surface even if it was faster than 0 km/s?
That could happen passively if the object had certain peculiar characteristics either by design or by coincidence.
Solar sail
- Is it possible to reach the Sun without expending any fuel/reaction mass?
- What is the functional form for r(t) for a solar-sail deorbit into the Sun?
- What is the optimal angle for a solar-sail deorbit towards the Sun when radial thrust is included?
- Maximum velocity achieved by solar sail
Poynting–Robertson drag
A spinning object orbiting near the Sun could, under some special circumstances slowly spiral into the Sun, but it would usually take a very long time even for a speck of dust, much longer than for a solar sail.