If the values are unique you can utilize that both your value column and a ROW_NUMBER are sequential:
MIN(seqval) AS StartVal,
MAX(seqval) AS EndVal,
-- assign the same grp as long as there's no gap
seqval - ROW_NUMBER() OVER (ORDER BY seqval ASC) AS grp,
GROUP BY grp
If values are non-unique you must switch to DENSE_RANK instead...