Hard to know by the photo there but you should have what's known as "drip edge" along the gable. Maybe that's the brown area in your photo (?)
The small gaps under the shingles can just be caulked to seal them up.
I'm not a roofing contractor but those are my 'seat of the pants' thoughts on the subject.