Define dp[][] as the minimum sum to reach cell (,) from (0,0). The base case: dp[0][0] = grid[0][0]. You must step on the starting cell.
For the first row, you can only come from the left: dp[0][] = dp[0][-1] + grid[0][]. For the first column, only from above: dp[][0] = dp[-1][0] + grid[][0]. Choosing the right state is often the hardest part. The state must capture everything needed to solve the subproblem independently.