You scared me with the word 'gradient' = number. Gradient is an advanced term in math for derivatives ...
In my language, I think you mean by gradient a slope for a linear function.
A linear function is a function y=a*x+b where y and x are variables. a,b are constants where a is the slope and b the place where this function crosses the y axes.
If you want to draw a line you only need to draw two (different) points and there is only one line that can be drawn which passes by both points.
Let the two points be (x1,y1) and (x2,y2). We find the slope first : slope = (y2-y1)/(x2-x1). For the next setp you just take one of the two points and continue the work.
That is why when we already give you the slope, we usually give you one points along with it.
We plug the coordinates of that point in the formula y=ax+b (where a=slope and we already have it) and isolate b.
I do one exemple of each case :
A line that passes through (4,3) at a gradient of -1.
a=slope =-1 (already given).
so y=(-1)*x+b. We can write it y=-x+b. After, we take the point (4,3) where its x coordinate is 4 and the y coordinate is 3 and plug them in our formula.
3 = -(4) + b so b = 7. So our final answer is : y=-x+7=(-1)*x+7. (same answer)
A line that passes through (2,1) and (4,5)
a=slope = (5-1)/(4-2) = 4/2=2. So we got the slope.
We take one of the two points. For example, (2,1) : 1=2(2) + b so 1=4+b do b=-3. So y=2x-3
(The answer would have been the same if we chose the point (4,5) because 5=2*4+b implies 5=8+b so b=-3. Same !)