What type of sensor to detect if an object passes through?
Solution 1: For simplicity and cost IR sensor + Arduino would be a good sensor. This solution has some cons: you would need a line of sensors, to observe whole line of goal. Also, a pair (IR light emitter and a receiver) needs to occupy left and right pole of goal (or bottom-top lines of the goal). Weakness of this system is here: When ball crosses the goal line partially, and it doesn't land in the goal completely the sensor will trigger (I'm not sure if situation like partial-ball-in-goal happens in table soccer, just stipulating).
To sort it out you can place sensors deeper in the goal, or apply two lines of sensors, one at the very front of the goal, and other deeper, about ball diameter inside the goal (here you can calculate ball speed in the moment of goal).

Solution2: Arduino + IR proximity sensor. Easier to implement, less invasive, but may be problematic with accuracy.  

Solution 3: Use Raspberry Pi plus camera and picture recognition framework (like OpenCV). It may seem a little bit more expensive, but there is no need of installing as many sensors as previous solutions.

The list is not complete, I am sure there will be much more ideas. These above come as first.
Good luck with your project!