I haven't tested this code but something like this should work:
onready var velocity = Vector2(100, 0)
var prev_pos_x
func _physics_process(delta)
if prev_pos_x < end_pos.x and position.x > end_pos.x:
velocity.x = -100
elif prev_pos_x > start_pos.x and position.x < start_pos.x:
velocity.x = 100
position += velocity * delta
prev_pos_x = position.x
It's also pretty easy to do this in the animation editor, although it gives you less fine control over the velocity